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