Update browser/service_process to use the new version of LaunchProcess.
[chromium-blink-merge.git] / base / BUILD.gn
blobde464f969145a85fc436d364eb660f6d09ff6aec
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
7 if (is_android) {
8   import("//build/config/android/rules.gni")
11 component("base") {
12   sources = [
13     "third_party/dmg_fp/dmg_fp.h",
14     "third_party/dmg_fp/g_fmt.cc",
15     "third_party/dmg_fp/dtoa_wrapper.cc",
16     "third_party/icu/icu_utf.cc",
17     "third_party/icu/icu_utf.h",
18     "third_party/superfasthash/superfasthash.c",
19     "allocator/allocator_extension.cc",
20     "allocator/allocator_extension.h",
21     "allocator/type_profiler_control.cc",
22     "allocator/type_profiler_control.h",
23     "android/application_status_listener.cc",
24     "android/application_status_listener.h",
25     "android/base_jni_registrar.cc",
26     "android/base_jni_registrar.h",
27     "android/build_info.cc",
28     "android/build_info.h",
29     "android/command_line_android.cc",
30     "android/command_line_android.h",
31     "android/content_uri_utils.cc",
32     "android/content_uri_utils.h",
33     "android/cpu_features.cc",
34     "android/event_log.cc",
35     "android/event_log.h",
36     "android/field_trial_list.cc",
37     "android/field_trial_list.h",
38     "android/fifo_utils.cc",
39     "android/fifo_utils.h",
40     "android/important_file_writer_android.cc",
41     "android/important_file_writer_android.h",
42     "android/locale_utils.cc",
43     "android/locale_utils.h",
44     "android/scoped_java_ref.cc",
45     "android/scoped_java_ref.h",
46     "android/jni_android.cc",
47     "android/jni_android.h",
48     "android/jni_array.cc",
49     "android/jni_array.h",
50     "android/jni_registrar.cc",
51     "android/jni_registrar.h",
52     "android/jni_string.cc",
53     "android/jni_string.h",
54     "android/jni_utils.cc",
55     "android/jni_utils.h",
56     "android/jni_weak_ref.cc",
57     "android/jni_weak_ref.h",
58     "android/library_loader/library_loader_hooks.cc",
59     "android/library_loader/library_loader_hooks.h",
60     "android/library_loader/library_load_from_apk_status_codes.h",
61     "android/memory_pressure_listener_android.cc",
62     "android/memory_pressure_listener_android.h",
63     "android/java_handler_thread.cc",
64     "android/java_handler_thread.h",
65     "android/path_service_android.cc",
66     "android/path_service_android.h",
67     "android/path_utils.cc",
68     "android/path_utils.h",
69     "android/sys_utils.cc",
70     "android/sys_utils.h",
71     "android/thread_utils.h",
72     "android/trace_event_binding.cc",
73     "android/trace_event_binding.h",
74     "async_socket_io_handler.h",
75     "async_socket_io_handler_posix.cc",
76     "async_socket_io_handler_win.cc",
77     "at_exit.cc",
78     "at_exit.h",
79     "atomic_ref_count.h",
80     "atomic_sequence_num.h",
81     "atomicops.h",
82     "atomicops_internals_gcc.h",
83     "atomicops_internals_mac.h",
84     "atomicops_internals_portable.h",
85     "atomicops_internals_x86_gcc.cc",
86     "atomicops_internals_x86_gcc.h",
87     "atomicops_internals_x86_msvc.h",
88     "auto_reset.h",
89     "barrier_closure.cc",
90     "barrier_closure.h",
91     "base_export.h",
92     "base_paths.cc",
93     "base_paths.h",
94     "base_paths_android.cc",
95     "base_paths_android.h",
96     "base_paths_mac.h",
97     "base_paths_mac.mm",
98     "base_paths_posix.cc",
99     "base_paths_posix.h",
100     "base_paths_win.cc",
101     "base_paths_win.h",
102     "base_switches.h",
103     "base64.cc",
104     "base64.h",
105     "basictypes.h",
106     "big_endian.cc",
107     "big_endian.h",
108     "bind.h",
109     "bind_helpers.cc",
110     "bind_helpers.h",
111     "bind_internal.h",
112     "bind_internal_win.h",
113     "bits.h",
114     "build_time.cc",
115     "build_time.h",
116     "callback.h",
117     "callback_helpers.cc",
118     "callback_helpers.h",
119     "callback_internal.cc",
120     "callback_internal.h",
121     "cancelable_callback.h",
122     "command_line.cc",
123     "command_line.h",
124     "chromeos/memory_pressure_observer_chromeos.cc",
125     "chromeos/memory_pressure_observer_chromeos.h",
126     "compiler_specific.h",
127     "containers/adapters.h",
128     "containers/hash_tables.h",
129     "containers/linked_list.h",
130     "containers/mru_cache.h",
131     "containers/small_map.h",
132     "containers/stack_container.h",
133     "cpu.cc",
134     "cpu.h",
135     "critical_closure.h",
136     "critical_closure_internal_ios.mm",
137     "debug/alias.cc",
138     "debug/alias.h",
139     "debug/asan_invalid_access.cc",
140     "debug/asan_invalid_access.h",
141     "debug/crash_logging.cc",
142     "debug/crash_logging.h",
143     "debug/debugger.cc",
144     "debug/debugger.h",
145     "debug/debugger_posix.cc",
146     "debug/debugger_win.cc",
147     "debug/dump_without_crashing.cc",
148     "debug/dump_without_crashing.h",
149     "debug/gdi_debug_util_win.cc",
150     "debug/gdi_debug_util_win.h",
152     # This file depends on files from the "allocator" target,
153     # but this target does not depend on "allocator" (see
154     # allocator.gyp for details).
155     "debug/leak_annotations.h",
156     "debug/leak_tracker.h",
157     "debug/proc_maps_linux.cc",
158     "debug/proc_maps_linux.h",
159     "debug/profiler.cc",
160     "debug/profiler.h",
161     "debug/stack_trace.cc",
162     "debug/stack_trace.h",
163     "debug/stack_trace_android.cc",
164     "debug/stack_trace_posix.cc",
165     "debug/stack_trace_win.cc",
166     "debug/task_annotator.cc",
167     "debug/task_annotator.h",
168     "debug/trace_event.h",
169     "debug/trace_event_android.cc",
170     "debug/trace_event_argument.cc",
171     "debug/trace_event_argument.h",
172     "debug/trace_event_impl.cc",
173     "debug/trace_event_impl.h",
174     "debug/trace_event_impl_constants.cc",
175     "debug/trace_event_memory.cc",
176     "debug/trace_event_memory.h",
177     "debug/trace_event_synthetic_delay.cc",
178     "debug/trace_event_synthetic_delay.h",
179     "debug/trace_event_system_stats_monitor.cc",
180     "debug/trace_event_system_stats_monitor.h",
181     "debug/trace_event_win.cc",
182     "deferred_sequenced_task_runner.cc",
183     "deferred_sequenced_task_runner.h",
184     "environment.cc",
185     "environment.h",
186     "event_recorder.h",
187     "event_recorder_stubs.cc",
188     "event_recorder_win.cc",
189     "file_descriptor_posix.h",
190     "file_version_info.h",
191     "file_version_info_mac.h",
192     "file_version_info_mac.mm",
193     "file_version_info_win.cc",
194     "file_version_info_win.h",
195     "files/dir_reader_fallback.h",
196     "files/dir_reader_linux.h",
197     "files/dir_reader_posix.h",
198     "files/file.cc",
199     "files/file_posix.cc",
200     "files/file_win.cc",
201     "files/file_enumerator.cc",
202     "files/file_enumerator.h",
203     "files/file_enumerator_posix.cc",
204     "files/file_enumerator_win.cc",
205     "files/file_path.cc",
206     "files/file_path.h",
207     "files/file_path_constants.cc",
208     "files/file_path_watcher.cc",
209     "files/file_path_watcher.h",
210     "files/file_path_watcher_fsevents.cc",
211     "files/file_path_watcher_fsevents.h",
212     "files/file_path_watcher_kqueue.cc",
213     "files/file_path_watcher_kqueue.h",
214     "files/file_path_watcher_linux.cc",
215     "files/file_path_watcher_mac.cc",
216     "files/file_path_watcher_win.cc",
217     "files/file_proxy.cc",
218     "files/file_proxy.h",
219     "files/file_util.cc",
220     "files/file_util.h",
221     "files/file_util_android.cc",
222     "files/file_util_linux.cc",
223     "files/file_util_mac.mm",
224     "files/file_util_posix.cc",
225     "files/file_util_proxy.cc",
226     "files/file_util_proxy.h",
227     "files/file_util_win.cc",
228     "files/important_file_writer.cc",
229     "files/important_file_writer.h",
230     "files/memory_mapped_file.cc",
231     "files/memory_mapped_file.h",
232     "files/memory_mapped_file_posix.cc",
233     "files/memory_mapped_file_win.cc",
234     "files/scoped_file.cc",
235     "files/scoped_file.h",
236     "files/scoped_temp_dir.cc",
237     "files/scoped_temp_dir.h",
238     "float_util.h",
239     "format_macros.h",
240     "gtest_prod_util.h",
241     "guid.cc",
242     "guid.h",
243     "guid_posix.cc",
244     "guid_win.cc",
245     "hash.cc",
246     "hash.h",
247     "id_map.h",
248     "ios/device_util.h",
249     "ios/device_util.mm",
250     "ios/ios_util.h",
251     "ios/ios_util.mm",
252     "ios/scoped_critical_action.h",
253     "ios/scoped_critical_action.mm",
254     "ios/weak_nsobject.h",
255     "ios/weak_nsobject.mm",
256     "json/json_file_value_serializer.cc",
257     "json/json_file_value_serializer.h",
258     "json/json_parser.cc",
259     "json/json_parser.h",
260     "json/json_reader.cc",
261     "json/json_reader.h",
262     "json/json_string_value_serializer.cc",
263     "json/json_string_value_serializer.h",
264     "json/json_value_converter.h",
265     "json/json_writer.cc",
266     "json/json_writer.h",
267     "json/string_escape.cc",
268     "json/string_escape.h",
269     "lazy_instance.cc",
270     "lazy_instance.h",
271     "linux_util.cc",
272     "linux_util.h",
273     "location.cc",
274     "location.h",
275     "logging.cc",
276     "logging.h",
277     "logging_win.cc",
278     "logging_win.h",
279     "mac/authorization_util.h",
280     "mac/authorization_util.mm",
281     "mac/bind_objc_block.h",
282     "mac/bundle_locations.h",
283     "mac/bundle_locations.mm",
284     "mac/cocoa_protocols.h",
285     "mac/foundation_util.h",
286     "mac/foundation_util.mm",
287     "mac/launch_services_util.cc",
288     "mac/launch_services_util.h",
289     "mac/launchd.cc",
290     "mac/launchd.h",
291     "mac/libdispatch_task_runner.cc",
292     "mac/libdispatch_task_runner.h",
293     "mac/mac_logging.h",
294     "mac/mac_logging.cc",
295     "mac/mac_util.h",
296     "mac/mac_util.mm",
297     "mac/mach_logging.cc",
298     "mac/mach_logging.h",
299     "mac/objc_property_releaser.h",
300     "mac/objc_property_releaser.mm",
301     "mac/os_crash_dumps.cc",
302     "mac/os_crash_dumps.h",
303     "mac/scoped_aedesc.h",
304     "mac/scoped_authorizationref.h",
305     "mac/scoped_block.h",
306     "mac/scoped_cftyperef.h",
307     "mac/scoped_ioobject.h",
308     "mac/scoped_ioplugininterface.h",
309     "mac/scoped_launch_data.h",
310     "mac/scoped_mach_port.cc",
311     "mac/scoped_mach_port.h",
312     "mac/scoped_mach_vm.cc",
313     "mac/scoped_mach_vm.h",
314     "mac/scoped_nsautorelease_pool.h",
315     "mac/scoped_nsautorelease_pool.mm",
316     "mac/scoped_nsexception_enabler.h",
317     "mac/scoped_nsexception_enabler.mm",
318     "mac/scoped_nsobject.h",
319     "mac/scoped_objc_class_swizzler.h",
320     "mac/scoped_objc_class_swizzler.mm",
321     "mac/scoped_sending_event.h",
322     "mac/scoped_sending_event.mm",
323     "mac/sdk_forward_declarations.h",
324     "macros.h",
325     "md5.cc",
326     "md5.h",
327     "memory/aligned_memory.cc",
328     "memory/aligned_memory.h",
329     "memory/discardable_memory.cc",
330     "memory/discardable_memory.h",
331     "memory/discardable_memory_android.cc",
332     "memory/discardable_memory_emulated.cc",
333     "memory/discardable_memory_emulated.h",
334     "memory/discardable_memory_linux.cc",
335     "memory/discardable_memory_mac.cc",
336     "memory/discardable_memory_manager.cc",
337     "memory/discardable_memory_manager.h",
338     "memory/discardable_memory_shmem.cc",
339     "memory/discardable_memory_shmem.h",
340     "memory/discardable_memory_shmem_allocator.cc",
341     "memory/discardable_memory_shmem_allocator.h",
342     "memory/discardable_memory_win.cc",
343     "memory/discardable_shared_memory.cc",
344     "memory/discardable_shared_memory.h",
345     "memory/linked_ptr.h",
346     "memory/manual_constructor.h",
347     "memory/memory_pressure_listener.cc",
348     "memory/memory_pressure_listener.h",
349     "memory/raw_scoped_refptr_mismatch_checker.h",
350     "memory/ref_counted.cc",
351     "memory/ref_counted.h",
352     "memory/ref_counted_delete_on_message_loop.h",
353     "memory/ref_counted_memory.cc",
354     "memory/ref_counted_memory.h",
355     "memory/scoped_open_process.h",
356     "memory/scoped_policy.h",
357     "memory/scoped_ptr.h",
358     "memory/scoped_vector.h",
359     "memory/shared_memory.h",
360     "memory/shared_memory_android.cc",
361     "memory/shared_memory_nacl.cc",
362     "memory/shared_memory_posix.cc",
363     "memory/shared_memory_win.cc",
364     "memory/singleton.cc",
365     "memory/singleton.h",
366     "memory/weak_ptr.cc",
367     "memory/weak_ptr.h",
368     "message_loop/incoming_task_queue.cc",
369     "message_loop/incoming_task_queue.h",
370     "message_loop/message_loop.cc",
371     "message_loop/message_loop.h",
372     "message_loop/message_loop_proxy.cc",
373     "message_loop/message_loop_proxy.h",
374     "message_loop/message_loop_proxy_impl.cc",
375     "message_loop/message_loop_proxy_impl.h",
376     "message_loop/message_pump.cc",
377     "message_loop/message_pump.h",
378     "message_loop/message_pump_android.cc",
379     "message_loop/message_pump_android.h",
380     "message_loop/message_pump_default.cc",
381     "message_loop/message_pump_default.h",
382     "message_loop/message_pump_glib.cc",
383     "message_loop/message_pump_glib.h",
384     "message_loop/message_pump_io_ios.cc",
385     "message_loop/message_pump_io_ios.h",
386     "message_loop/message_pump_libevent.cc",
387     "message_loop/message_pump_libevent.h",
388     "message_loop/message_pump_mac.h",
389     "message_loop/message_pump_mac.mm",
390     "message_loop/message_pump_win.cc",
391     "message_loop/message_pump_win.h",
392     "metrics/field_trial.cc",
393     "metrics/field_trial.h",
394     "metrics/sample_map.cc",
395     "metrics/sample_map.h",
396     "metrics/sample_vector.cc",
397     "metrics/sample_vector.h",
398     "metrics/bucket_ranges.cc",
399     "metrics/bucket_ranges.h",
400     "metrics/histogram.cc",
401     "metrics/histogram.h",
402     "metrics/histogram_base.cc",
403     "metrics/histogram_base.h",
404     "metrics/histogram_delta_serialization.cc",
405     "metrics/histogram_delta_serialization.",
406     "metrics/histogram_flattener.h",
407     "metrics/histogram_macros.h",
408     "metrics/histogram_samples.cc",
409     "metrics/histogram_samples.h",
410     "metrics/histogram_snapshot_manager.cc",
411     "metrics/histogram_snapshot_manager.h",
412     "metrics/sparse_histogram.cc",
413     "metrics/sparse_histogram.h",
414     "metrics/statistics_recorder.cc",
415     "metrics/statistics_recorder.h",
416     "metrics/stats_counters.cc",
417     "metrics/stats_counters.h",
418     "metrics/stats_table.cc",
419     "metrics/stats_table.h",
420     "metrics/user_metrics.cc",
421     "metrics/user_metrics.h",
422     "metrics/user_metrics_action.h",
423     "move.h",
424     "native_library.h",
425     "native_library_mac.mm",
426     "native_library_posix.cc",
427     "native_library_win.cc",
428     "numerics/safe_conversions.h",
429     "numerics/safe_conversions_impl.h",
430     "numerics/safe_math.h",
431     "numerics/safe_math_impl.h",
432     "nix/mime_util_xdg.cc",
433     "nix/mime_util_xdg.h",
434     "nix/xdg_util.cc",
435     "nix/xdg_util.h",
436     "observer_list.h",
437     "observer_list_threadsafe.h",
438     "os_compat_android.cc",
439     "os_compat_android.h",
440     "os_compat_nacl.cc",
441     "os_compat_nacl.h",
442     "path_service.cc",
443     "path_service.h",
444     "pending_task.cc",
445     "pending_task.h",
446     "pickle.cc",
447     "pickle.h",
448     "port.h",
449     "posix/eintr_wrapper.h",
450     "posix/file_descriptor_shuffle.cc",
451     "posix/global_descriptors.cc",
452     "posix/global_descriptors.h",
453     "posix/unix_domain_socket_linux.cc",
454     "posix/unix_domain_socket_linux.h",
455     "power_monitor/power_monitor.cc",
456     "power_monitor/power_monitor.h",
457     "power_monitor/power_monitor_device_source.cc",
458     "power_monitor/power_monitor_device_source.h",
459     "power_monitor/power_monitor_device_source_android.cc",
460     "power_monitor/power_monitor_device_source_android.h",
461     "power_monitor/power_monitor_device_source_chromeos.cc",
462     "power_monitor/power_monitor_device_source_ios.mm",
463     "power_monitor/power_monitor_device_source_mac.mm",
464     "power_monitor/power_monitor_device_source_posix.cc",
465     "power_monitor/power_monitor_device_source_win.cc",
466     "power_monitor/power_monitor_source.cc",
467     "power_monitor/power_monitor_source.h",
468     "power_monitor/power_observer.h",
469     "process/internal_linux.cc",
470     "process/internal_linux.h",
471     "process/kill.cc",
472     "process/kill.h",
473     "process/kill_mac.cc",
474     "process/kill_posix.cc",
475     "process/kill_win.cc",
476     "process/launch.cc",
477     "process/launch.h",
478     "process/launch_ios.cc",
479     "process/launch_mac.cc",
480     "process/launch_posix.cc",
481     "process/launch_win.cc",
482     "process/memory.cc",
483     "process/memory.h",
484     "process/memory_linux.cc",
485     "process/memory_mac.mm",
486     "process/memory_win.cc",
487     "process/process.h",
488     "process/process_handle_freebsd.cc",
489     "process/process_handle_linux.cc",
490     "process/process_handle_mac.cc",
491     "process/process_handle_openbsd.cc",
492     "process/process_handle_posix.cc",
493     "process/process_handle_win.cc",
494     "process/process_info.h",
495     "process/process_info_linux.cc",
496     "process/process_info_mac.cc",
497     "process/process_info_win.cc",
498     "process/process_iterator.cc",
499     "process/process_iterator.h",
500     "process/process_iterator_freebsd.cc",
501     "process/process_iterator_linux.cc",
502     "process/process_iterator_mac.cc",
503     "process/process_iterator_openbsd.cc",
504     "process/process_iterator_win.cc",
505     "process/process_linux.cc",
506     "process/process_metrics.cc",
507     "process/process_metrics.h",
508     "process/process_metrics_freebsd.cc",
509     "process/process_metrics_ios.cc",
510     "process/process_metrics_linux.cc",
511     "process/process_metrics_mac.cc",
512     "process/process_metrics_openbsd.cc",
513     "process/process_metrics_posix.cc",
514     "process/process_metrics_win.cc",
515     "process/process_posix.cc",
516     "process/process_win.cc",
517     "profiler/alternate_timer.cc",
518     "profiler/alternate_timer.h",
519     "profiler/scoped_profile.cc",
520     "profiler/scoped_profile.h",
521     "profiler/scoped_tracker.cc",
522     "profiler/scoped_tracker.h",
523     "profiler/tracked_time.cc",
524     "profiler/tracked_time.h",
525     "rand_util.cc",
526     "rand_util.h",
527     "rand_util_nacl.cc",
528     "rand_util_posix.cc",
529     "rand_util_win.cc",
530     "run_loop.cc",
531     "run_loop.h",
532     "safe_strerror_posix.cc",
533     "safe_strerror_posix.h",
534     "scoped_generic.h",
535     "scoped_native_library.cc",
536     "scoped_native_library.h",
537     "scoped_observer.h",
538     "sequence_checker.h",
539     "sequence_checker_impl.cc",
540     "sequence_checker_impl.h",
541     "sequenced_task_runner.cc",
542     "sequenced_task_runner.h",
543     "sequenced_task_runner_helpers.h",
544     "sha1.h",
545     "sha1_portable.cc",
546     "sha1_win.cc",
547     "single_thread_task_runner.h",
548     "stl_util.h",
549     "strings/latin1_string_conversions.cc",
550     "strings/latin1_string_conversions.h",
551     "strings/nullable_string16.cc",
552     "strings/nullable_string16.h",
553     "strings/safe_sprintf.cc",
554     "strings/safe_sprintf.h",
555     "strings/string16.cc",
556     "strings/string16.h",
557     "strings/string_number_conversions.cc",
558     "strings/string_split.cc",
559     "strings/string_split.h",
560     "strings/string_number_conversions.h",
561     "strings/string_piece.cc",
562     "strings/string_piece.h",
563     "strings/string_tokenizer.h",
564     "strings/string_util.cc",
565     "strings/string_util.h",
566     "strings/string_util_constants.cc",
567     "strings/string_util_posix.h",
568     "strings/string_util_win.h",
569     "strings/stringize_macros.h",
570     "strings/stringprintf.cc",
571     "strings/stringprintf.h",
572     "strings/sys_string_conversions.h",
573     "strings/sys_string_conversions_mac.mm",
574     "strings/sys_string_conversions_posix.cc",
575     "strings/sys_string_conversions_win.cc",
576     "strings/utf_offset_string_conversions.cc",
577     "strings/utf_offset_string_conversions.h",
578     "strings/utf_string_conversion_utils.cc",
579     "strings/utf_string_conversion_utils.h",
580     "strings/utf_string_conversions.cc",
581     "strings/utf_string_conversions.h",
582     "supports_user_data.cc",
583     "supports_user_data.h",
584     "sync_socket.h",
585     "sync_socket_posix.cc",
586     "sync_socket_win.cc",
587     "synchronization/cancellation_flag.cc",
588     "synchronization/cancellation_flag.h",
589     "synchronization/condition_variable.h",
590     "synchronization/condition_variable_posix.cc",
591     "synchronization/condition_variable_win.cc",
592     "synchronization/lock.cc",
593     "synchronization/lock.h",
594     "synchronization/lock_impl.h",
595     "synchronization/lock_impl_posix.cc",
596     "synchronization/lock_impl_win.cc",
597     "synchronization/spin_wait.h",
598     "synchronization/waitable_event.h",
599     "synchronization/waitable_event_posix.cc",
600     "synchronization/waitable_event_watcher.h",
601     "synchronization/waitable_event_watcher_posix.cc",
602     "synchronization/waitable_event_watcher_win.cc",
603     "synchronization/waitable_event_win.cc",
604     "system_monitor/system_monitor.cc",
605     "system_monitor/system_monitor.h",
606     "sys_byteorder.h",
607     "sys_info.cc",
608     "sys_info.h",
609     "sys_info_android.cc",
610     "sys_info_chromeos.cc",
611     "sys_info_freebsd.cc",
612     "sys_info_ios.mm",
613     "sys_info_linux.cc",
614     "sys_info_mac.cc",
615     "sys_info_openbsd.cc",
616     "sys_info_posix.cc",
617     "sys_info_win.cc",
618     "task/cancelable_task_tracker.cc",
619     "task/cancelable_task_tracker.h",
620     "task_runner.cc",
621     "task_runner.h",
622     "task_runner_util.h",
623     "template_util.h",
624     "thread_task_runner_handle.cc",
625     "thread_task_runner_handle.h",
626     "threading/non_thread_safe.h",
627     "threading/non_thread_safe_impl.cc",
628     "threading/non_thread_safe_impl.h",
629     "threading/platform_thread.h",
630     "threading/platform_thread_android.cc",
631     "threading/platform_thread_linux.cc",
632     "threading/platform_thread_mac.mm",
633     "threading/platform_thread_posix.cc",
634     "threading/platform_thread_win.cc",
635     "threading/post_task_and_reply_impl.cc",
636     "threading/post_task_and_reply_impl.h",
637     "threading/sequenced_worker_pool.cc",
638     "threading/sequenced_worker_pool.h",
639     "threading/simple_thread.cc",
640     "threading/simple_thread.h",
641     "threading/thread.cc",
642     "threading/thread.h",
643     "threading/thread_checker.h",
644     "threading/thread_checker_impl.cc",
645     "threading/thread_checker_impl.h",
646     "threading/thread_collision_warner.cc",
647     "threading/thread_collision_warner.h",
648     "threading/thread_id_name_manager.cc",
649     "threading/thread_id_name_manager.h",
650     "threading/thread_local.h",
651     "threading/thread_local_android.cc",
652     "threading/thread_local_posix.cc",
653     "threading/thread_local_storage.cc",
654     "threading/thread_local_storage.h",
655     "threading/thread_local_storage_posix.cc",
656     "threading/thread_local_storage_win.cc",
657     "threading/thread_local_win.cc",
658     "threading/thread_restrictions.h",
659     "threading/thread_restrictions.cc",
660     "threading/watchdog.cc",
661     "threading/watchdog.h",
662     "threading/worker_pool.h",
663     "threading/worker_pool.cc",
664     "threading/worker_pool_posix.cc",
665     "threading/worker_pool_posix.h",
666     "threading/worker_pool_win.cc",
667     "time/clock.cc",
668     "time/clock.h",
669     "time/default_clock.cc",
670     "time/default_clock.h",
671     "time/default_tick_clock.cc",
672     "time/default_tick_clock.h",
673     "time/tick_clock.cc",
674     "time/tick_clock.h",
675     "time/time.cc",
676     "time/time.h",
677     "time/time_mac.cc",
678     "time/time_posix.cc",
679     "time/time_win.cc",
680     "timer/elapsed_timer.cc",
681     "timer/elapsed_timer.h",
682     "timer/hi_res_timer_manager.h",
683     "timer/hi_res_timer_manager_posix.cc",
684     "timer/hi_res_timer_manager_win.cc",
685     "timer/mock_timer.cc",
686     "timer/mock_timer.h",
687     "timer/timer.cc",
688     "timer/timer.h",
689     "tracked_objects.cc",
690     "tracked_objects.h",
691     "tracking_info.cc",
692     "tracking_info.h",
693     "tuple.h",
694     "values.cc",
695     "values.h",
696     "value_conversions.cc",
697     "value_conversions.h",
698     "version.cc",
699     "version.h",
700     "vlog.cc",
701     "vlog.h",
702     "win/enum_variant.cc",
703     "win/enum_variant.h",
704     "win/event_trace_consumer.h",
705     "win/event_trace_controller.cc",
706     "win/event_trace_controller.h",
707     "win/event_trace_provider.cc",
708     "win/event_trace_provider.h",
709     "win/i18n.cc",
710     "win/i18n.h",
711     "win/iat_patch_function.cc",
712     "win/iat_patch_function.h",
713     "win/iunknown_impl.cc",
714     "win/iunknown_impl.h",
715     "win/message_window.cc",
716     "win/message_window.h",
717     "win/metro.cc",
718     "win/metro.h",
719     "win/object_watcher.cc",
720     "win/object_watcher.h",
721     "win/registry.cc",
722     "win/registry.h",
723     "win/resource_util.cc",
724     "win/resource_util.h",
725     "win/scoped_bstr.cc",
726     "win/scoped_bstr.h",
727     "win/scoped_co_mem.h",
728     "win/scoped_com_initializer.h",
729     "win/scoped_comptr.h",
730     "win/scoped_gdi_object.h",
731     "win/scoped_handle.cc",
732     "win/scoped_handle.h",
733     "win/scoped_hdc.h",
734     "win/scoped_hglobal.h",
735     "win/scoped_process_information.cc",
736     "win/scoped_process_information.h",
737     "win/scoped_propvariant.h",
738     "win/scoped_select_object.h",
739     "win/scoped_variant.cc",
740     "win/scoped_variant.h",
741     "win/shortcut.cc",
742     "win/shortcut.h",
743     "win/startup_information.cc",
744     "win/startup_information.h",
745     "win/win_util.cc",
746     "win/win_util.h",
747     "win/windows_version.cc",
748     "win/windows_version.h",
749     "win/wrapped_window_proc.cc",
750     "win/wrapped_window_proc.h",
751   ]
753   if (is_nacl) {
754     sources += [ "files/file_path_watcher_stub.cc" ]
755   }
757   sources -= [
758     "process/process_handle_freebsd.cc",
759     "process/process_handle_openbsd.cc",
760     "process/process_iterator_freebsd.cc",
761     "process/process_iterator_openbsd.cc",
762     "process/process_metrics_freebsd.cc",
763     "process/process_metrics_openbsd.cc",
764     "sys_info_freebsd.cc",
765     "sys_info_openbsd.cc",
766   ]
768   defines = [ "BASE_IMPLEMENTATION" ]
770   deps = [
771     ":base_static",
772     "//base/allocator:allocator_extension_thunks",
773     "//base/third_party/dynamic_annotations",
774     "//base/third_party/nspr",
775     "//third_party/modp_b64",
776   ]
778   # Allow more direct string conversions on platforms with native utf8
779   # strings
780   if (is_mac || is_ios || is_chromeos) {
781     defines += [ "SYSTEM_NATIVE_UTF8" ]
782   }
784   if (is_android) {
785     sources += [
786       "memory/discardable_memory_ashmem_allocator.cc",
787       "memory/discardable_memory_ashmem_allocator.h",
788       "memory/discardable_memory_ashmem.cc",
789       "memory/discardable_memory_ashmem.h",
790     ]
791     sources -= [
792       "base_paths_posix.cc",
793       "power_monitor/power_monitor_device_source_posix.cc",
794     ]
796     # Android uses some Linux sources, put those back.
797     set_sources_assignment_filter([])
798     sources += [
799       "debug/proc_maps_linux.cc",
800       "files/file_path_watcher_linux.cc",
801       "process/memory_linux.cc",
802       "process/internal_linux.cc",
803       "process/process_handle_linux.cc",
804       "process/process_iterator_linux.cc",
805       "process/process_metrics_linux.cc",
806       "posix/unix_domain_socket_linux.cc",
807       "sys_info_linux.cc",
808     ]
809     set_sources_assignment_filter(sources_assignment_filter)
811     deps += [
812       ":base_jni_headers",
813       "//third_party/ashmem",
814       "//third_party/android_tools:cpu_features",
815     ]
817     # logging.cc uses the Android logging library.
818     libs = [ "log" ]
820     sources -= [ "debug/stack_trace_posix.cc" ]
821   }
823   if (is_chromeos) {
824     sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ]
825   }
827   if (is_nacl) {
828     # These things would otherwise be built on a Posix build but aren't
829     # supported on NaCl.
830     sources -= [
831       "debug/stack_trace_posix.cc",
832       "files/file_enumerator_posix.cc",
833       "files/file_util_posix.cc",
834       "message_loop/message_pump_libevent.cc",
835       "process/kill_posix.cc",
836       "process/launch_posix.cc",
837       "process/process_metrics_posix.cc",
838       "process/process_posix.cc",
839       "metrics/field_trial.cc",
840       "native_library_posix.cc",
841       "memory/shared_memory_posix.cc",
842       "sync_socket_posix.cc",
843       "sys_info_posix.cc",
844     ]
845   } else {
846     # Remove nacl stuff.
847     sources -= [
848       "os_compat_nacl.cc",
849       "os_compat_nacl.h",
850       "rand_util_nacl.cc",
851       "memory/shared_memory_nacl.cc",
852     ]
853   }
855   # Windows.
856   if (is_win) {
857     sources -= [
858       "event_recorder_stubs.cc",
859       "message_loop/message_pump_libevent.cc",
860       "strings/string16.cc",
862       # Not using sha1_win.cc because it may have caused a
863       # regression to page cycler moz.
864       "sha1_win.cc",
865     ]
867     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
868     cflags = [ "/wd4267" ]
870     libs = [
871       "cfgmgr32.lib",
872       "netapi32.lib",
873       "powrprof.lib",
874       "setupapi.lib",
875     ]
876     ldflags = [
877       "/DELAYLOAD:cfgmgr32.dll",
878       "/DELAYLOAD:powrprof.dll",
879       "/DELAYLOAD:setupapi.dll",
880     ]
881   } else if (!is_nacl) {
882     # Non-Windows.
883     deps += [ "//third_party/libevent" ]
884   }
886   # Mac.
887   if (is_mac) {
888     sources += [
889       "memory/discardable_memory_mach.cc",
890       "memory/discardable_memory_mach.h",
891     ]
892     sources -= [
893       "base_paths_posix.cc",
894       "native_library_posix.cc",
895       "strings/sys_string_conversions_posix.cc",
896     ]
897     deps += [ "//third_party/mach_override" ]
898   } else {
899     # Non-Mac.
900     sources -= [
901       "files/file_path_watcher_fsevents.cc",
902       "files/file_path_watcher_fsevents.h",
903       "files/file_path_watcher_kqueue.cc",
904       "files/file_path_watcher_kqueue.h",
905     ]
906   }
908   # Linux.
909   if (is_linux) {
910     # TODO(brettw) this will need to be parameterized at some point.
911     linux_configs = [ "//build/config/linux:glib" ]
913     configs += linux_configs
914     all_dependent_configs = linux_configs
916     defines += [ "USE_SYMBOLIZE" ]
918     # These dependencies are not required on Android, and in the case
919     # of xdg_mime must be excluded due to licensing restrictions.
920     deps += [
921       "//base/third_party/symbolize",
922       "//base/third_party/xdg_mime",
923       "//base/third_party/xdg_user_dirs",
924     ]
925   } else {
926     # Non-Linux.
927     sources -= [
928       "nix/mime_util_xdg.cc",
929       "nix/mime_util_xdg.h",
930       "nix/xdg_util.cc",
931       "nix/xdg_util.h",
932     ]
934     if (!is_android) {
935       sources -= [
936         "linux_util.cc",
937         "linux_util.h",
938       ]
939     }
940   }
942   if (!use_glib) {
943     sources -= [
944       "message_loop/message_pump_glib.cc",
945       "message_loop/message_pump_glib.h",
946     ]
947   }
949   configs += [ "//build/config/compiler:wexit_time_destructors" ]
950   if (is_android && !is_debug) {
951     configs -= [ "//build/config/compiler:optimize" ]
952     configs += [ "//build/config/compiler:optimize_max" ]
953   }
956 # This is the subset of files from base that should not be used with a dynamic
957 # library. Note that this library cannot depend on base because base depends on
958 # base_static.
959 source_set("base_static") {
960   sources = [
961     "base_switches.cc",
962     "base_switches.h",
963     "win/pe_image.cc",
964     "win/pe_image.h",
965   ]
967   if (is_android && !is_debug) {
968     configs -= [ "//build/config/compiler:optimize" ]
969     configs += [ "//build/config/compiler:optimize_max" ]
970   }
973 component("i18n") {
974   output_name = "base_i18n"
975   sources = [
976     "i18n/base_i18n_export.h",
977     "i18n/bidi_line_iterator.cc",
978     "i18n/bidi_line_iterator.h",
979     "i18n/break_iterator.cc",
980     "i18n/break_iterator.h",
981     "i18n/case_conversion.cc",
982     "i18n/case_conversion.h",
983     "i18n/char_iterator.cc",
984     "i18n/char_iterator.h",
985     "i18n/file_util_icu.cc",
986     "i18n/file_util_icu.h",
987     "i18n/i18n_constants.cc",
988     "i18n/i18n_constants.h",
989     "i18n/icu_encoding_detection.cc",
990     "i18n/icu_encoding_detection.h",
991     "i18n/icu_string_conversions.cc",
992     "i18n/icu_string_conversions.h",
993     "i18n/icu_util.cc",
994     "i18n/icu_util.h",
995     "i18n/number_formatting.cc",
996     "i18n/number_formatting.h",
997     "i18n/rtl.cc",
998     "i18n/rtl.h",
999     "i18n/streaming_utf8_validator.cc",
1000     "i18n/streaming_utf8_validator.h",
1001     "i18n/string_compare.cc",
1002     "i18n/string_compare.h",
1003     "i18n/string_search.cc",
1004     "i18n/string_search.h",
1005     "i18n/time_formatting.cc",
1006     "i18n/time_formatting.h",
1007     "i18n/timezone.cc",
1008     "i18n/timezone.h",
1009     "i18n/utf8_validator_tables.cc",
1010     "i18n/utf8_validator_tables.h",
1011   ]
1012   defines = [ "BASE_I18N_IMPLEMENTATION" ]
1013   configs += [ "//build/config/compiler:wexit_time_destructors" ]
1014   deps = [
1015     ":base",
1016     "//base/third_party/dynamic_annotations",
1017     "//third_party/icu",
1018   ]
1020   if (is_android && !is_debug) {
1021     configs -= [ "//build/config/compiler:optimize" ]
1022     configs += [ "//build/config/compiler:optimize_max" ]
1023   }
1025   if (is_win) {
1026     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1027     cflags = [ "/wd4267" ]
1028   }
1031 source_set("prefs") {
1032   sources = [
1033     "prefs/base_prefs_export.h",
1034     "prefs/default_pref_store.cc",
1035     "prefs/default_pref_store.h",
1036     "prefs/json_pref_store.cc",
1037     "prefs/json_pref_store.h",
1038     "prefs/overlay_user_pref_store.cc",
1039     "prefs/overlay_user_pref_store.h",
1040     "prefs/persistent_pref_store.h",
1041     "prefs/pref_change_registrar.cc",
1042     "prefs/pref_change_registrar.h",
1043     "prefs/pref_filter.h",
1044     "prefs/pref_member.cc",
1045     "prefs/pref_member.h",
1046     "prefs/pref_notifier.h",
1047     "prefs/pref_notifier_impl.cc",
1048     "prefs/pref_notifier_impl.h",
1049     "prefs/pref_observer.h",
1050     "prefs/pref_registry.cc",
1051     "prefs/pref_registry.h",
1052     "prefs/pref_registry_simple.cc",
1053     "prefs/pref_registry_simple.h",
1054     "prefs/pref_service.cc",
1055     "prefs/pref_service.h",
1056     "prefs/pref_service_factory.cc",
1057     "prefs/pref_service_factory.h",
1058     "prefs/pref_store.cc",
1059     "prefs/pref_store.h",
1060     "prefs/pref_value_map.cc",
1061     "prefs/pref_value_map.h",
1062     "prefs/pref_value_store.cc",
1063     "prefs/pref_value_store.h",
1064     "prefs/scoped_user_pref_update.cc",
1065     "prefs/scoped_user_pref_update.h",
1066     "prefs/value_map_pref_store.cc",
1067     "prefs/value_map_pref_store.h",
1068     "prefs/writeable_pref_store.h",
1069   ]
1071   defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1073   deps = [
1074     ":base",
1075   ]
1077   if (is_android && !is_debug) {
1078     configs -= [ "//build/config/compiler:optimize" ]
1079     configs += [ "//build/config/compiler:optimize_max" ]
1080   }
1083 source_set("prefs_test_support") {
1084   testonly = true
1085   sources = [
1086     "prefs/mock_pref_change_callback.cc",
1087     "prefs/mock_pref_change_callback.h",
1088     "prefs/pref_store_observer_mock.cc",
1089     "prefs/pref_store_observer_mock.h",
1090     "prefs/testing_pref_service.cc",
1091     "prefs/testing_pref_service.h",
1092     "prefs/testing_pref_store.cc",
1093     "prefs/testing_pref_store.h",
1094   ]
1096   public_deps = [
1097     ":prefs",
1098   ]
1099   deps = [
1100     ":base",
1101     "//testing/gmock",
1102     "//testing/gtest",
1103   ]
1106 source_set("message_loop_tests") {
1107   testonly = true
1108   sources = [
1109     "message_loop/message_loop_test.cc",
1110     "message_loop/message_loop_test.h",
1111   ]
1113   deps = [
1114     ":base",
1115     "//testing/gtest",
1116   ]
1119 # TODO(pasko): Remove this target when crbug.com/424562 is fixed.
1120 source_set("protect_file_posix") {
1121   sources = [
1122     "files/protect_file_posix.cc",
1123   ]
1126 test("base_unittests") {
1127   sources = [
1128     "android/application_status_listener_unittest.cc",
1129     "android/content_uri_utils_unittest.cc",
1130     "android/jni_android_unittest.cc",
1131     "android/jni_array_unittest.cc",
1132     "android/jni_string_unittest.cc",
1133     "android/path_utils_unittest.cc",
1134     "android/scoped_java_ref_unittest.cc",
1135     "android/sys_utils_unittest.cc",
1136     "async_socket_io_handler_unittest.cc",
1137     "at_exit_unittest.cc",
1138     "atomicops_unittest.cc",
1139     "barrier_closure_unittest.cc",
1140     "base64_unittest.cc",
1141     "big_endian_unittest.cc",
1142     "bind_unittest.cc",
1143     "bind_unittest.nc",
1144     "bits_unittest.cc",
1145     "build_time_unittest.cc",
1146     "callback_helpers_unittest.cc",
1147     "callback_list_unittest.cc",
1148     "callback_list_unittest.nc",
1149     "callback_unittest.cc",
1150     "callback_unittest.nc",
1151     "cancelable_callback_unittest.cc",
1152     "command_line_unittest.cc",
1153     "containers/adapters_unittest.cc",
1154     "containers/hash_tables_unittest.cc",
1155     "containers/linked_list_unittest.cc",
1156     "containers/mru_cache_unittest.cc",
1157     "containers/small_map_unittest.cc",
1158     "containers/stack_container_unittest.cc",
1159     "cpu_unittest.cc",
1160     "debug/crash_logging_unittest.cc",
1161     "debug/debugger_unittest.cc",
1162     "debug/leak_tracker_unittest.cc",
1163     "debug/proc_maps_linux_unittest.cc",
1164     "debug/stack_trace_unittest.cc",
1165     "debug/task_annotator_unittest.cc",
1166     "debug/trace_event_argument_unittest.cc",
1167     "debug/trace_event_memory_unittest.cc",
1168     "debug/trace_event_synthetic_delay_unittest.cc",
1169     "debug/trace_event_system_stats_monitor_unittest.cc",
1170     "debug/trace_event_unittest.cc",
1171     "debug/trace_event_unittest.h",
1172     "debug/trace_event_win_unittest.cc",
1173     "deferred_sequenced_task_runner_unittest.cc",
1174     "environment_unittest.cc",
1175     "file_version_info_unittest.cc",
1176     "files/dir_reader_posix_unittest.cc",
1177     "files/file_path_unittest.cc",
1178     "files/file_proxy_unittest.cc",
1179     "files/file_unittest.cc",
1180     "files/file_util_proxy_unittest.cc",
1181     "files/file_util_unittest.cc",
1182     "files/important_file_writer_unittest.cc",
1183     "files/scoped_temp_dir_unittest.cc",
1184     "gmock_unittest.cc",
1185     "guid_unittest.cc",
1186     "hash_unittest.cc",
1187     "id_map_unittest.cc",
1188     "i18n/break_iterator_unittest.cc",
1189     "i18n/char_iterator_unittest.cc",
1190     "i18n/case_conversion_unittest.cc",
1191     "i18n/file_util_icu_unittest.cc",
1192     "i18n/icu_string_conversions_unittest.cc",
1193     "i18n/number_formatting_unittest.cc",
1194     "i18n/rtl_unittest.cc",
1195     "i18n/streaming_utf8_validator_unittest.cc",
1196     "i18n/string_search_unittest.cc",
1197     "i18n/time_formatting_unittest.cc",
1198     "i18n/timezone_unittest.cc",
1199     "ios/device_util_unittest.mm",
1200     "ios/weak_nsobject_unittest.mm",
1201     "json/json_parser_unittest.cc",
1202     "json/json_reader_unittest.cc",
1203     "json/json_value_converter_unittest.cc",
1204     "json/json_value_serializer_unittest.cc",
1205     "json/json_writer_unittest.cc",
1206     "json/string_escape_unittest.cc",
1207     "lazy_instance_unittest.cc",
1208     "logging_unittest.cc",
1209     "mac/bind_objc_block_unittest.mm",
1210     "mac/foundation_util_unittest.mm",
1211     "mac/libdispatch_task_runner_unittest.cc",
1212     "mac/mac_util_unittest.mm",
1213     "mac/objc_property_releaser_unittest.mm",
1214     "mac/scoped_nsobject_unittest.mm",
1215     "mac/scoped_objc_class_swizzler_unittest.mm",
1216     "mac/scoped_sending_event_unittest.mm",
1217     "md5_unittest.cc",
1218     "memory/aligned_memory_unittest.cc",
1219     "memory/discardable_memory_manager_unittest.cc",
1220     "memory/discardable_memory_unittest.cc",
1221     "memory/discardable_shared_memory_unittest.cc",
1222     "memory/linked_ptr_unittest.cc",
1223     "memory/ref_counted_memory_unittest.cc",
1224     "memory/ref_counted_unittest.cc",
1225     "memory/scoped_ptr_unittest.cc",
1226     "memory/scoped_ptr_unittest.nc",
1227     "memory/scoped_vector_unittest.cc",
1228     "memory/shared_memory_unittest.cc",
1229     "memory/singleton_unittest.cc",
1230     "memory/weak_ptr_unittest.cc",
1231     "memory/weak_ptr_unittest.nc",
1232     "message_loop/message_loop_proxy_impl_unittest.cc",
1233     "message_loop/message_loop_proxy_unittest.cc",
1234     "message_loop/message_loop_unittest.cc",
1235     "message_loop/message_pump_glib_unittest.cc",
1236     "message_loop/message_pump_io_ios_unittest.cc",
1237     "metrics/sample_map_unittest.cc",
1238     "metrics/sample_vector_unittest.cc",
1239     "metrics/bucket_ranges_unittest.cc",
1240     "metrics/field_trial_unittest.cc",
1241     "metrics/histogram_base_unittest.cc",
1242     "metrics/histogram_delta_serialization_unittest.cc",
1243     "metrics/histogram_snapshot_manager_unittest.cc",
1244     "metrics/histogram_unittest.cc",
1245     "metrics/sparse_histogram_unittest.cc",
1246     "metrics/stats_table_unittest.cc",
1247     "metrics/statistics_recorder_unittest.cc",
1248     "observer_list_unittest.cc",
1249     "os_compat_android_unittest.cc",
1250     "path_service_unittest.cc",
1251     "pickle_unittest.cc",
1252     "posix/file_descriptor_shuffle_unittest.cc",
1253     "posix/unix_domain_socket_linux_unittest.cc",
1254     "power_monitor/power_monitor_unittest.cc",
1255     "prefs/default_pref_store_unittest.cc",
1256     "prefs/json_pref_store_unittest.cc",
1257     "prefs/overlay_user_pref_store_unittest.cc",
1258     "prefs/pref_change_registrar_unittest.cc",
1259     "prefs/pref_member_unittest.cc",
1260     "prefs/pref_notifier_impl_unittest.cc",
1261     "prefs/pref_service_unittest.cc",
1262     "prefs/pref_value_map_unittest.cc",
1263     "prefs/pref_value_store_unittest.cc",
1264     "prefs/scoped_user_pref_update_unittest.cc",
1265     "process/memory_unittest.cc",
1266     "process/memory_unittest_mac.h",
1267     "process/memory_unittest_mac.mm",
1268     "process/process_metrics_unittest.cc",
1269     "process/process_metrics_unittest_ios.cc",
1270     "process/process_unittest.cc",
1271     "process/process_util_unittest.cc",
1272     "process/process_util_unittest_ios.cc",
1273     "profiler/tracked_time_unittest.cc",
1274     "rand_util_unittest.cc",
1275     "numerics/safe_numerics_unittest.cc",
1276     "scoped_clear_errno_unittest.cc",
1277     "scoped_generic_unittest.cc",
1278     "scoped_native_library_unittest.cc",
1279     "security_unittest.cc",
1280     "sequence_checker_unittest.cc",
1281     "sha1_unittest.cc",
1282     "stl_util_unittest.cc",
1283     "strings/nullable_string16_unittest.cc",
1284     "strings/safe_sprintf_unittest.cc",
1285     "strings/string16_unittest.cc",
1286     "strings/stringprintf_unittest.cc",
1287     "strings/string_number_conversions_unittest.cc",
1288     "strings/string_piece_unittest.cc",
1289     "strings/string_split_unittest.cc",
1290     "strings/string_tokenizer_unittest.cc",
1291     "strings/string_util_unittest.cc",
1292     "strings/stringize_macros_unittest.cc",
1293     "strings/sys_string_conversions_mac_unittest.mm",
1294     "strings/sys_string_conversions_unittest.cc",
1295     "strings/utf_offset_string_conversions_unittest.cc",
1296     "strings/utf_string_conversions_unittest.cc",
1297     "supports_user_data_unittest.cc",
1298     "sync_socket_unittest.cc",
1299     "synchronization/cancellation_flag_unittest.cc",
1300     "synchronization/condition_variable_unittest.cc",
1301     "synchronization/lock_unittest.cc",
1302     "synchronization/waitable_event_unittest.cc",
1303     "synchronization/waitable_event_watcher_unittest.cc",
1304     "sys_info_unittest.cc",
1305     "system_monitor/system_monitor_unittest.cc",
1306     "task/cancelable_task_tracker_unittest.cc",
1307     "task_runner_util_unittest.cc",
1308     "template_util_unittest.cc",
1309     "test/expectations/expectation_unittest.cc",
1310     "test/expectations/parser_unittest.cc",
1311     "test/histogram_tester_unittest.cc",
1312     "test/test_reg_util_win_unittest.cc",
1313     "test/trace_event_analyzer_unittest.cc",
1314     "threading/non_thread_safe_unittest.cc",
1315     "threading/platform_thread_unittest.cc",
1316     "threading/sequenced_worker_pool_unittest.cc",
1317     "threading/simple_thread_unittest.cc",
1318     "threading/thread_checker_unittest.cc",
1319     "threading/thread_collision_warner_unittest.cc",
1320     "threading/thread_id_name_manager_unittest.cc",
1321     "threading/thread_local_storage_unittest.cc",
1322     "threading/thread_local_unittest.cc",
1323     "threading/thread_unittest.cc",
1324     "threading/watchdog_unittest.cc",
1325     "threading/worker_pool_posix_unittest.cc",
1326     "threading/worker_pool_unittest.cc",
1327     "time/pr_time_unittest.cc",
1328     "time/time_unittest.cc",
1329     "time/time_win_unittest.cc",
1330     "timer/hi_res_timer_manager_unittest.cc",
1331     "timer/mock_timer_unittest.cc",
1332     "timer/timer_unittest.cc",
1333     "tools_sanity_unittest.cc",
1334     "tracked_objects_unittest.cc",
1335     "tuple_unittest.cc",
1336     "values_unittest.cc",
1337     "version_unittest.cc",
1338     "vlog_unittest.cc",
1339     "win/dllmain.cc",
1340     "win/enum_variant_unittest.cc",
1341     "win/event_trace_consumer_unittest.cc",
1342     "win/event_trace_controller_unittest.cc",
1343     "win/event_trace_provider_unittest.cc",
1344     "win/i18n_unittest.cc",
1345     "win/iunknown_impl_unittest.cc",
1346     "win/message_window_unittest.cc",
1347     "win/object_watcher_unittest.cc",
1348     "win/pe_image_unittest.cc",
1349     "win/registry_unittest.cc",
1350     "win/scoped_bstr_unittest.cc",
1351     "win/scoped_comptr_unittest.cc",
1352     "win/scoped_process_information_unittest.cc",
1353     "win/scoped_variant_unittest.cc",
1354     "win/shortcut_unittest.cc",
1355     "win/startup_information_unittest.cc",
1356     "win/win_util_unittest.cc",
1357     "win/wrapped_window_proc_unittest.cc",
1358   ]
1360   deps = [
1361     ":base",
1362     ":i18n",
1363     ":message_loop_tests",
1364     ":prefs",
1365     ":prefs_test_support",
1366     "//base/allocator",
1367     "//base/test:run_all_unittests",
1368     "//base/test:test_support",
1369     "//base/third_party/dynamic_annotations",
1370     "//testing/gmock",
1371     "//testing/gtest",
1372     "//third_party/icu",
1373   ]
1375   if (is_ios) {
1376     sources -= [
1377       "metrics/stats_table_uinittest.cc",  # Requires spawning a process.
1378       "process/memory_unittest.cc",
1379       "process/memory_unittest_mac.h",
1380       "process/memory_unittest_mac.mm",
1381       "process/process_unittest.cc",
1382       "process/process_util_unittest.cc",
1383     ]
1385     # Pull in specific Mac files for iOS (which have been filtered out by file
1386     # name rules).
1387     set_sources_assignment_filter([])
1388     sources += [
1389       "mac/bind_objc_block_unittest.mm",
1390       "mac/foundation_util_unittest.mm",
1391       "mac/objc_property_releaser_unittest.mm",
1392       "mac/scoped_nsobject_unittest.mm",
1393       "sys_string_conversions_mac_unittest.mm",
1394     ]
1395     set_sources_assignment_filter(sources_assignment_filter)
1397     # TODO(GYP): dep on copy_test_data_ios action.
1398   }
1400   if (is_linux) {
1401     sources -= [ "file_version_info_unittest.cc" ]
1402     sources += [ "nix/xdg_util_unittest.cc" ]
1403     defines = [ "USE_SYMBOLIZE" ]
1404     configs += [ "//build/config/linux:glib" ]
1405   }
1407   if (!is_linux || use_ozone) {
1408     sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1409   }
1411   if (is_posix || is_ios) {
1412     sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1413     deps += [ "//third_party/libevent" ]
1414   }
1416   if (is_android) {
1417     deps += [ "//testing/android:native_test_native_code" ]
1418     set_sources_assignment_filter([])
1419     sources += [ "debug/proc_maps_linux_unittest.cc" ]
1420     set_sources_assignment_filter(sources_assignment_filter)
1421   }
1423   if (is_win) {
1424     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1425     cflags = [ "/wd4267" ]
1426   }
1429 if (is_android) {
1430   # GYP: //base.gyp:base_jni_headers
1431   generate_jni("base_jni_headers") {
1432     sources = [
1433       "android/java/src/org/chromium/base/ApplicationStatus.java",
1434       "android/java/src/org/chromium/base/BuildInfo.java",
1435       "android/java/src/org/chromium/base/CommandLine.java",
1436       "android/java/src/org/chromium/base/ContentUriUtils.java",
1437       "android/java/src/org/chromium/base/CpuFeatures.java",
1438       "android/java/src/org/chromium/base/EventLog.java",
1439       "android/java/src/org/chromium/base/FieldTrialList.java",
1440       "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
1441       "android/java/src/org/chromium/base/JNIUtils.java",
1442       "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
1443       "android/java/src/org/chromium/base/LocaleUtils.java",
1444       "android/java/src/org/chromium/base/MemoryPressureListener.java",
1445       "android/java/src/org/chromium/base/JavaHandlerThread.java",
1446       "android/java/src/org/chromium/base/PathService.java",
1447       "android/java/src/org/chromium/base/PathUtils.java",
1448       "android/java/src/org/chromium/base/PowerMonitor.java",
1449       "android/java/src/org/chromium/base/SystemMessageHandler.java",
1450       "android/java/src/org/chromium/base/SysUtils.java",
1451       "android/java/src/org/chromium/base/ThreadUtils.java",
1452       "android/java/src/org/chromium/base/TraceEvent.java",
1453     ]
1454     jni_package = "base"
1455   }
1457   # GYP: //base.gyp:base_java
1458   android_library("base_java") {
1459     srcjar_deps = [
1460       ":base_android_java_enums_srcjar",
1461       ":base_native_libraries_gen",
1462     ]
1464     deps = [
1465       "//third_party/jsr-305:jsr_305_javalib",
1466     ]
1468     DEPRECATED_java_in_dir = "android/java/src"
1470     # A new version of NativeLibraries.java (with the actual correct values)
1471     # will be created when creating an apk.
1472     jar_excluded_patterns = [
1473       "*/NativeLibraries.class",
1474       "*/NativeLibraries##*.class",
1475     ]
1476   }
1478   # GYP: //base.gyp:base_javatests
1479   android_library("base_javatests") {
1480     deps = [
1481       ":base_java",
1482       ":base_java_test_support",
1483     ]
1484     DEPRECATED_java_in_dir = "android/javatests/src"
1485   }
1487   # GYP: //base.gyp:base_java_test_support
1488   android_library("base_java_test_support") {
1489     deps = [
1490       ":base_java",
1491     ]
1492     DEPRECATED_java_in_dir = "test/android/javatests/src"
1493   }
1495   # GYP: //base.gyp:base_java_application_state
1496   # GYP: //base.gyp:base_java_library_load_from_apk_status_codes
1497   # GYP: //base.gyp:base_java_memory_pressure_level
1498   java_cpp_enum("base_android_java_enums_srcjar") {
1499     sources = [
1500       "android/application_status_listener.h",
1501       "android/library_loader/library_load_from_apk_status_codes.h",
1502       "memory/memory_pressure_listener.h",
1503     ]
1504     outputs = [
1505       "org/chromium/base/ApplicationState.java",
1506       "org/chromium/base/library_loader/LibraryLoadFromApkStatusCodes.java",
1507       "org/chromium/base/MemoryPressureLevel.java",
1508     ]
1509   }
1511   # GYP: //base/base.gyp:base_native_libraries_gen
1512   java_cpp_template("base_native_libraries_gen") {
1513     sources = [
1514       "android/java/templates/NativeLibraries.template",
1515     ]
1516     package_name = "org/chromium/base/library_loader"
1517   }
1519   # GYP: //base.gyp:base_java_unittest_support
1520   android_library("base_java_unittest_support") {
1521     deps = [
1522       ":base_java",
1523     ]
1524     java_files =
1525         [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
1526   }
1528   # GYP: //base.gyp:base_unittests_apk
1529   unittest_apk("base_unittests_apk") {
1530     deps = [
1531       ":base_java",
1532       ":base_java_unittest_support",
1533       ":base_unittests",
1534     ]
1535     unittests_dep = ":base_unittests"
1536   }