Delay default apps installation on Chrome OS for first time sign-in
[chromium-blink-merge.git] / base / BUILD.gn
blobe5e4aa445c5624c0a1f05fcfa4d4cd544c9d9055
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_samples.cc",
403     "metrics/histogram_samples.h",
404     "metrics/histogram_snapshot_manager.cc",
405     "metrics/histogram_snapshot_manager.h",
406     "metrics/sparse_histogram.cc",
407     "metrics/sparse_histogram.h",
408     "metrics/statistics_recorder.cc",
409     "metrics/statistics_recorder.h",
410     "metrics/stats_counters.cc",
411     "metrics/stats_counters.h",
412     "metrics/stats_table.cc",
413     "metrics/stats_table.h",
414     "metrics/user_metrics.cc",
415     "metrics/user_metrics.h",
416     "metrics/user_metrics_action.h",
417     "move.h",
418     "native_library.h",
419     "native_library_mac.mm",
420     "native_library_posix.cc",
421     "native_library_win.cc",
422     "numerics/safe_conversions.h",
423     "numerics/safe_conversions_impl.h",
424     "numerics/safe_math.h",
425     "numerics/safe_math_impl.h",
426     "nix/mime_util_xdg.cc",
427     "nix/mime_util_xdg.h",
428     "nix/xdg_util.cc",
429     "nix/xdg_util.h",
430     "observer_list.h",
431     "observer_list_threadsafe.h",
432     "os_compat_android.cc",
433     "os_compat_android.h",
434     "os_compat_nacl.cc",
435     "os_compat_nacl.h",
436     "path_service.cc",
437     "path_service.h",
438     "pending_task.cc",
439     "pending_task.h",
440     "pickle.cc",
441     "pickle.h",
442     "port.h",
443     "posix/eintr_wrapper.h",
444     "posix/file_descriptor_shuffle.cc",
445     "posix/global_descriptors.cc",
446     "posix/global_descriptors.h",
447     "posix/unix_domain_socket_linux.cc",
448     "posix/unix_domain_socket_linux.h",
449     "power_monitor/power_monitor.cc",
450     "power_monitor/power_monitor.h",
451     "power_monitor/power_monitor_device_source.cc",
452     "power_monitor/power_monitor_device_source.h",
453     "power_monitor/power_monitor_device_source_android.cc",
454     "power_monitor/power_monitor_device_source_android.h",
455     "power_monitor/power_monitor_device_source_chromeos.cc",
456     "power_monitor/power_monitor_device_source_ios.mm",
457     "power_monitor/power_monitor_device_source_mac.mm",
458     "power_monitor/power_monitor_device_source_posix.cc",
459     "power_monitor/power_monitor_device_source_win.cc",
460     "power_monitor/power_monitor_source.cc",
461     "power_monitor/power_monitor_source.h",
462     "power_monitor/power_observer.h",
463     "process/internal_linux.cc",
464     "process/internal_linux.h",
465     "process/kill.cc",
466     "process/kill.h",
467     "process/kill_mac.cc",
468     "process/kill_posix.cc",
469     "process/kill_win.cc",
470     "process/launch.cc",
471     "process/launch.h",
472     "process/launch_ios.cc",
473     "process/launch_mac.cc",
474     "process/launch_posix.cc",
475     "process/launch_win.cc",
476     "process/memory.cc",
477     "process/memory.h",
478     "process/memory_linux.cc",
479     "process/memory_mac.mm",
480     "process/memory_win.cc",
481     "process/process.h",
482     "process/process_handle_freebsd.cc",
483     "process/process_handle_linux.cc",
484     "process/process_handle_mac.cc",
485     "process/process_handle_openbsd.cc",
486     "process/process_handle_posix.cc",
487     "process/process_handle_win.cc",
488     "process/process_info.h",
489     "process/process_info_linux.cc",
490     "process/process_info_mac.cc",
491     "process/process_info_win.cc",
492     "process/process_iterator.cc",
493     "process/process_iterator.h",
494     "process/process_iterator_freebsd.cc",
495     "process/process_iterator_linux.cc",
496     "process/process_iterator_mac.cc",
497     "process/process_iterator_openbsd.cc",
498     "process/process_iterator_win.cc",
499     "process/process_linux.cc",
500     "process/process_metrics.cc",
501     "process/process_metrics.h",
502     "process/process_metrics_freebsd.cc",
503     "process/process_metrics_ios.cc",
504     "process/process_metrics_linux.cc",
505     "process/process_metrics_mac.cc",
506     "process/process_metrics_openbsd.cc",
507     "process/process_metrics_posix.cc",
508     "process/process_metrics_win.cc",
509     "process/process_posix.cc",
510     "process/process_win.cc",
511     "profiler/scoped_profile.cc",
512     "profiler/scoped_profile.h",
513     "profiler/alternate_timer.cc",
514     "profiler/alternate_timer.h",
515     "profiler/tracked_time.cc",
516     "profiler/tracked_time.h",
517     "rand_util.cc",
518     "rand_util.h",
519     "rand_util_nacl.cc",
520     "rand_util_posix.cc",
521     "rand_util_win.cc",
522     "run_loop.cc",
523     "run_loop.h",
524     "safe_strerror_posix.cc",
525     "safe_strerror_posix.h",
526     "scoped_generic.h",
527     "scoped_native_library.cc",
528     "scoped_native_library.h",
529     "scoped_observer.h",
530     "sequence_checker.h",
531     "sequence_checker_impl.cc",
532     "sequence_checker_impl.h",
533     "sequenced_task_runner.cc",
534     "sequenced_task_runner.h",
535     "sequenced_task_runner_helpers.h",
536     "sha1.h",
537     "sha1_portable.cc",
538     "sha1_win.cc",
539     "single_thread_task_runner.h",
540     "stl_util.h",
541     "strings/latin1_string_conversions.cc",
542     "strings/latin1_string_conversions.h",
543     "strings/nullable_string16.cc",
544     "strings/nullable_string16.h",
545     "strings/safe_sprintf.cc",
546     "strings/safe_sprintf.h",
547     "strings/string16.cc",
548     "strings/string16.h",
549     "strings/string_number_conversions.cc",
550     "strings/string_split.cc",
551     "strings/string_split.h",
552     "strings/string_number_conversions.h",
553     "strings/string_piece.cc",
554     "strings/string_piece.h",
555     "strings/string_tokenizer.h",
556     "strings/string_util.cc",
557     "strings/string_util.h",
558     "strings/string_util_constants.cc",
559     "strings/string_util_posix.h",
560     "strings/string_util_win.h",
561     "strings/stringize_macros.h",
562     "strings/stringprintf.cc",
563     "strings/stringprintf.h",
564     "strings/sys_string_conversions.h",
565     "strings/sys_string_conversions_mac.mm",
566     "strings/sys_string_conversions_posix.cc",
567     "strings/sys_string_conversions_win.cc",
568     "strings/utf_offset_string_conversions.cc",
569     "strings/utf_offset_string_conversions.h",
570     "strings/utf_string_conversion_utils.cc",
571     "strings/utf_string_conversion_utils.h",
572     "strings/utf_string_conversions.cc",
573     "strings/utf_string_conversions.h",
574     "supports_user_data.cc",
575     "supports_user_data.h",
576     "sync_socket.h",
577     "sync_socket_posix.cc",
578     "sync_socket_win.cc",
579     "synchronization/cancellation_flag.cc",
580     "synchronization/cancellation_flag.h",
581     "synchronization/condition_variable.h",
582     "synchronization/condition_variable_posix.cc",
583     "synchronization/condition_variable_win.cc",
584     "synchronization/lock.cc",
585     "synchronization/lock.h",
586     "synchronization/lock_impl.h",
587     "synchronization/lock_impl_posix.cc",
588     "synchronization/lock_impl_win.cc",
589     "synchronization/spin_wait.h",
590     "synchronization/waitable_event.h",
591     "synchronization/waitable_event_posix.cc",
592     "synchronization/waitable_event_watcher.h",
593     "synchronization/waitable_event_watcher_posix.cc",
594     "synchronization/waitable_event_watcher_win.cc",
595     "synchronization/waitable_event_win.cc",
596     "system_monitor/system_monitor.cc",
597     "system_monitor/system_monitor.h",
598     "sys_byteorder.h",
599     "sys_info.cc",
600     "sys_info.h",
601     "sys_info_android.cc",
602     "sys_info_chromeos.cc",
603     "sys_info_freebsd.cc",
604     "sys_info_ios.mm",
605     "sys_info_linux.cc",
606     "sys_info_mac.cc",
607     "sys_info_openbsd.cc",
608     "sys_info_posix.cc",
609     "sys_info_win.cc",
610     "task/cancelable_task_tracker.cc",
611     "task/cancelable_task_tracker.h",
612     "task_runner.cc",
613     "task_runner.h",
614     "task_runner_util.h",
615     "template_util.h",
616     "thread_task_runner_handle.cc",
617     "thread_task_runner_handle.h",
618     "threading/non_thread_safe.h",
619     "threading/non_thread_safe_impl.cc",
620     "threading/non_thread_safe_impl.h",
621     "threading/platform_thread.h",
622     "threading/platform_thread_android.cc",
623     "threading/platform_thread_linux.cc",
624     "threading/platform_thread_mac.mm",
625     "threading/platform_thread_posix.cc",
626     "threading/platform_thread_win.cc",
627     "threading/post_task_and_reply_impl.cc",
628     "threading/post_task_and_reply_impl.h",
629     "threading/sequenced_worker_pool.cc",
630     "threading/sequenced_worker_pool.h",
631     "threading/simple_thread.cc",
632     "threading/simple_thread.h",
633     "threading/thread.cc",
634     "threading/thread.h",
635     "threading/thread_checker.h",
636     "threading/thread_checker_impl.cc",
637     "threading/thread_checker_impl.h",
638     "threading/thread_collision_warner.cc",
639     "threading/thread_collision_warner.h",
640     "threading/thread_id_name_manager.cc",
641     "threading/thread_id_name_manager.h",
642     "threading/thread_local.h",
643     "threading/thread_local_android.cc",
644     "threading/thread_local_posix.cc",
645     "threading/thread_local_storage.cc",
646     "threading/thread_local_storage.h",
647     "threading/thread_local_storage_posix.cc",
648     "threading/thread_local_storage_win.cc",
649     "threading/thread_local_win.cc",
650     "threading/thread_restrictions.h",
651     "threading/thread_restrictions.cc",
652     "threading/watchdog.cc",
653     "threading/watchdog.h",
654     "threading/worker_pool.h",
655     "threading/worker_pool.cc",
656     "threading/worker_pool_posix.cc",
657     "threading/worker_pool_posix.h",
658     "threading/worker_pool_win.cc",
659     "time/clock.cc",
660     "time/clock.h",
661     "time/default_clock.cc",
662     "time/default_clock.h",
663     "time/default_tick_clock.cc",
664     "time/default_tick_clock.h",
665     "time/tick_clock.cc",
666     "time/tick_clock.h",
667     "time/time.cc",
668     "time/time.h",
669     "time/time_mac.cc",
670     "time/time_posix.cc",
671     "time/time_win.cc",
672     "timer/elapsed_timer.cc",
673     "timer/elapsed_timer.h",
674     "timer/hi_res_timer_manager.h",
675     "timer/hi_res_timer_manager_posix.cc",
676     "timer/hi_res_timer_manager_win.cc",
677     "timer/mock_timer.cc",
678     "timer/mock_timer.h",
679     "timer/timer.cc",
680     "timer/timer.h",
681     "tracked_objects.cc",
682     "tracked_objects.h",
683     "tracking_info.cc",
684     "tracking_info.h",
685     "tuple.h",
686     "values.cc",
687     "values.h",
688     "value_conversions.cc",
689     "value_conversions.h",
690     "version.cc",
691     "version.h",
692     "vlog.cc",
693     "vlog.h",
694     "win/enum_variant.cc",
695     "win/enum_variant.h",
696     "win/event_trace_consumer.h",
697     "win/event_trace_controller.cc",
698     "win/event_trace_controller.h",
699     "win/event_trace_provider.cc",
700     "win/event_trace_provider.h",
701     "win/i18n.cc",
702     "win/i18n.h",
703     "win/iat_patch_function.cc",
704     "win/iat_patch_function.h",
705     "win/iunknown_impl.cc",
706     "win/iunknown_impl.h",
707     "win/message_window.cc",
708     "win/message_window.h",
709     "win/metro.cc",
710     "win/metro.h",
711     "win/object_watcher.cc",
712     "win/object_watcher.h",
713     "win/registry.cc",
714     "win/registry.h",
715     "win/resource_util.cc",
716     "win/resource_util.h",
717     "win/scoped_bstr.cc",
718     "win/scoped_bstr.h",
719     "win/scoped_co_mem.h",
720     "win/scoped_com_initializer.h",
721     "win/scoped_comptr.h",
722     "win/scoped_gdi_object.h",
723     "win/scoped_handle.cc",
724     "win/scoped_handle.h",
725     "win/scoped_hdc.h",
726     "win/scoped_hglobal.h",
727     "win/scoped_process_information.cc",
728     "win/scoped_process_information.h",
729     "win/scoped_propvariant.h",
730     "win/scoped_select_object.h",
731     "win/scoped_variant.cc",
732     "win/scoped_variant.h",
733     "win/shortcut.cc",
734     "win/shortcut.h",
735     "win/startup_information.cc",
736     "win/startup_information.h",
737     "win/win_util.cc",
738     "win/win_util.h",
739     "win/windows_version.cc",
740     "win/windows_version.h",
741     "win/wrapped_window_proc.cc",
742     "win/wrapped_window_proc.h",
743   ]
745   if (is_nacl) {
746     sources += [ "files/file_path_watcher_stub.cc" ]
747   }
749   sources -= [
750     "process/process_handle_freebsd.cc",
751     "process/process_handle_openbsd.cc",
752     "process/process_iterator_freebsd.cc",
753     "process/process_iterator_openbsd.cc",
754     "process/process_metrics_freebsd.cc",
755     "process/process_metrics_openbsd.cc",
756     "sys_info_freebsd.cc",
757     "sys_info_openbsd.cc",
758   ]
760   defines = [
761     "BASE_IMPLEMENTATION",
762   ]
764   deps = [
765     ":base_static",
766     "//base/allocator:allocator_extension_thunks",
767     "//base/third_party/dynamic_annotations",
768     "//base/third_party/nspr",
769     "//third_party/modp_b64",
770   ]
772   if (is_android) {
773     sources += [
774        "memory/discardable_memory_ashmem_allocator.cc",
775        "memory/discardable_memory_ashmem_allocator.h",
776        "memory/discardable_memory_ashmem.cc",
777        "memory/discardable_memory_ashmem.h",
778     ]
779     sources -= [
780       "base_paths_posix.cc",
781       "power_monitor/power_monitor_device_source_posix.cc",
782     ]
784     # Android uses some Linux sources, put those back.
785     set_sources_assignment_filter([])
786     sources += [
787       "debug/proc_maps_linux.cc",
788       "files/file_path_watcher_linux.cc",
789       "process/memory_linux.cc",
790       "process/internal_linux.cc",
791       "process/process_handle_linux.cc",
792       "process/process_iterator_linux.cc",
793       "process/process_metrics_linux.cc",
794       "posix/unix_domain_socket_linux.cc",
795       "sys_info_linux.cc",
796     ]
797     set_sources_assignment_filter(sources_assignment_filter)
799     deps += [
800       ":base_jni_headers",
801       "//third_party/ashmem",
802       "//third_party/android_tools:cpu_features"
803     ]
805     # logging.cc uses the Android logging library.
806     libs = [ "log" ]
808     sources -= [
809       "debug/stack_trace_posix.cc",
810     ]
811   }
813   if (is_chromeos) {
814     sources -= [
815       "power_monitor/power_monitor_device_source_posix.cc",
816     ]
817   }
819   if (is_nacl) {
820     # These things would otherwise be built on a Posix build but aren't
821     # supported on NaCl.
822     sources -= [
823       "debug/stack_trace_posix.cc",
824       "files/file_enumerator_posix.cc",
825       "files/file_util_posix.cc",
826       "message_loop/message_pump_libevent.cc",
827       "process/kill_posix.cc",
828       "process/launch_posix.cc",
829       "process/process_metrics_posix.cc",
830       "process/process_posix.cc",
831       "metrics/field_trial.cc",
832       "native_library_posix.cc",
833       "memory/shared_memory_posix.cc",
834       "sync_socket_posix.cc",
835       "sys_info_posix.cc",
836     ]
837   } else {
838     # Remove nacl stuff.
839     sources -= [
840       "os_compat_nacl.cc",
841       "os_compat_nacl.h",
842       "rand_util_nacl.cc",
843       "memory/shared_memory_nacl.cc",
844     ]
845   }
847   # Windows.
848   if (is_win) {
849     sources -= [
850       "event_recorder_stubs.cc",
851       "message_loop/message_pump_libevent.cc",
852       "strings/string16.cc",
853       # Not using sha1_win.cc because it may have caused a
854       # regression to page cycler moz.
855       "sha1_win.cc",
856     ]
858     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
859     #cflags = [ "/wd4267" ]
861     libs = [
862       "cfgmgr32.lib",
863       "netapi32.lib",
864       "powrprof.lib",
865       "setupapi.lib",
866     ]
867     ldflags = [
868       "/DELAYLOAD:cfgmgr32.dll",
869       "/DELAYLOAD:powrprof.dll",
870       "/DELAYLOAD:setupapi.dll",
871     ]
872   } else if (!is_nacl) {
873     # Non-Windows.
874     deps += [ "//third_party/libevent" ]
875   }
877   # Mac.
878   if (is_mac) {
879     sources += [
880        "memory/discardable_memory_mach.cc",
881        "memory/discardable_memory_mach.h",
882     ]
883     sources -= [
884       "base_paths_posix.cc",
885       "native_library_posix.cc",
886       "strings/sys_string_conversions_posix.cc",
887     ]
888     deps += [ "//third_party/mach_override" ]
889   } else {
890     # Non-Mac.
891     sources -= [
892       "files/file_path_watcher_fsevents.cc",
893       "files/file_path_watcher_fsevents.h",
894       "files/file_path_watcher_kqueue.cc",
895       "files/file_path_watcher_kqueue.h",
896     ]
897   }
899   # Linux.
900   if (is_linux) {
901     # TODO(brettw) this will need to be parameterized at some point.
902     linux_configs = [
903       "//build/config/linux:glib",
904     ]
906     configs += linux_configs
907     all_dependent_configs = linux_configs
909     defines += [ "USE_SYMBOLIZE" ]
911     # These dependencies are not required on Android, and in the case
912     # of xdg_mime must be excluded due to licensing restrictions.
913     deps += [
914       "//base/third_party/symbolize",
915       "//base/third_party/xdg_mime",
916       "//base/third_party/xdg_user_dirs",
917     ]
918   } else {
919     # Non-Linux.
920     sources -= [
921       "nix/mime_util_xdg.cc",
922       "nix/mime_util_xdg.h",
923       "nix/xdg_util.cc",
924       "nix/xdg_util.h",
925     ]
927     if (!is_android) {
928       sources -= [
929         "linux_util.cc",
930         "linux_util.h",
931       ]
932     }
933   }
935   if (!use_glib) {
936     sources -= [
937       "message_loop/message_pump_glib.cc",
938       "message_loop/message_pump_glib.h",
939     ]
940   }
942   configs += [ "//build/config/compiler:wexit_time_destructors" ]
943   if (is_android && !is_debug) {
944     configs -= [ "//build/config/compiler:optimize" ]
945     configs += [ "//build/config/compiler:optimize_max" ]
946   }
949 # This is the subset of files from base that should not be used with a dynamic
950 # library. Note that this library cannot depend on base because base depends on
951 # base_static.
952 source_set("base_static") {
953   sources = [
954     "base_switches.cc",
955     "base_switches.h",
956     "win/pe_image.cc",
957     "win/pe_image.h",
958   ]
960   if (is_android && !is_debug) {
961     configs -= [ "//build/config/compiler:optimize" ]
962     configs += [ "//build/config/compiler:optimize_max" ]
963   }
966 component("i18n") {
967   output_name = "base_i18n"
968   sources = [
969     "i18n/base_i18n_export.h",
970     "i18n/bidi_line_iterator.cc",
971     "i18n/bidi_line_iterator.h",
972     "i18n/break_iterator.cc",
973     "i18n/break_iterator.h",
974     "i18n/case_conversion.cc",
975     "i18n/case_conversion.h",
976     "i18n/char_iterator.cc",
977     "i18n/char_iterator.h",
978     "i18n/file_util_icu.cc",
979     "i18n/file_util_icu.h",
980     "i18n/i18n_constants.cc",
981     "i18n/i18n_constants.h",
982     "i18n/icu_encoding_detection.cc",
983     "i18n/icu_encoding_detection.h",
984     "i18n/icu_string_conversions.cc",
985     "i18n/icu_string_conversions.h",
986     "i18n/icu_util.cc",
987     "i18n/icu_util.h",
988     "i18n/number_formatting.cc",
989     "i18n/number_formatting.h",
990     "i18n/rtl.cc",
991     "i18n/rtl.h",
992     "i18n/streaming_utf8_validator.cc",
993     "i18n/streaming_utf8_validator.h",
994     "i18n/string_compare.cc",
995     "i18n/string_compare.h",
996     "i18n/string_search.cc",
997     "i18n/string_search.h",
998     "i18n/time_formatting.cc",
999     "i18n/time_formatting.h",
1000     "i18n/timezone.cc",
1001     "i18n/timezone.h",
1002     "i18n/utf8_validator_tables.cc",
1003     "i18n/utf8_validator_tables.h",
1004   ]
1005   defines = [ "BASE_I18N_IMPLEMENTATION" ]
1006   configs += [ "//build/config/compiler:wexit_time_destructors" ]
1007   deps = [
1008     ":base",
1009     "//base/third_party/dynamic_annotations",
1010     "//third_party/icu",
1011   ]
1013   if (is_android && !is_debug) {
1014     configs -= [ "//build/config/compiler:optimize" ]
1015     configs += [ "//build/config/compiler:optimize_max" ]
1016   }
1019 source_set("prefs") {
1020   sources = [
1021     "prefs/base_prefs_export.h",
1022     "prefs/default_pref_store.cc",
1023     "prefs/default_pref_store.h",
1024     "prefs/json_pref_store.cc",
1025     "prefs/json_pref_store.h",
1026     "prefs/overlay_user_pref_store.cc",
1027     "prefs/overlay_user_pref_store.h",
1028     "prefs/persistent_pref_store.h",
1029     "prefs/pref_change_registrar.cc",
1030     "prefs/pref_change_registrar.h",
1031     "prefs/pref_filter.h",
1032     "prefs/pref_member.cc",
1033     "prefs/pref_member.h",
1034     "prefs/pref_notifier.h",
1035     "prefs/pref_notifier_impl.cc",
1036     "prefs/pref_notifier_impl.h",
1037     "prefs/pref_observer.h",
1038     "prefs/pref_registry.cc",
1039     "prefs/pref_registry.h",
1040     "prefs/pref_registry_simple.cc",
1041     "prefs/pref_registry_simple.h",
1042     "prefs/pref_service.cc",
1043     "prefs/pref_service.h",
1044     "prefs/pref_service_factory.cc",
1045     "prefs/pref_service_factory.h",
1046     "prefs/pref_store.cc",
1047     "prefs/pref_store.h",
1048     "prefs/pref_value_map.cc",
1049     "prefs/pref_value_map.h",
1050     "prefs/pref_value_store.cc",
1051     "prefs/pref_value_store.h",
1052     "prefs/scoped_user_pref_update.cc",
1053     "prefs/scoped_user_pref_update.h",
1054     "prefs/value_map_pref_store.cc",
1055     "prefs/value_map_pref_store.h",
1056     "prefs/writeable_pref_store.h",
1057   ]
1059   defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1061   deps = [ ":base" ]
1063   if (is_android && !is_debug) {
1064     configs -= [ "//build/config/compiler:optimize" ]
1065     configs += [ "//build/config/compiler:optimize_max" ]
1066   }
1069 source_set("prefs_test_support") {
1070   testonly = true
1071   sources = [
1072     "prefs/mock_pref_change_callback.cc",
1073     "prefs/mock_pref_change_callback.h",
1074     "prefs/pref_store_observer_mock.cc",
1075     "prefs/pref_store_observer_mock.h",
1076     "prefs/testing_pref_service.cc",
1077     "prefs/testing_pref_service.h",
1078     "prefs/testing_pref_store.cc",
1079     "prefs/testing_pref_store.h",
1080   ]
1082   deps = [
1083     ":base",
1084     ":prefs",
1085     "//testing/gmock",
1086     "//testing/gtest",
1087   ]
1090 source_set("message_loop_tests") {
1091   testonly = true
1092   sources = [
1093     "message_loop/message_loop_test.cc",
1094     "message_loop/message_loop_test.h",
1095   ]
1097   deps = [
1098     ":base",
1099     "//testing/gtest",
1100   ]
1103 test("base_unittests") {
1104   sources = [
1105     "android/application_status_listener_unittest.cc",
1106     "android/jni_android_unittest.cc",
1107     "android/jni_array_unittest.cc",
1108     "android/jni_string_unittest.cc",
1109     "android/path_utils_unittest.cc",
1110     "android/scoped_java_ref_unittest.cc",
1111     "android/sys_utils_unittest.cc",
1112     "async_socket_io_handler_unittest.cc",
1113     "at_exit_unittest.cc",
1114     "atomicops_unittest.cc",
1115     "barrier_closure_unittest.cc",
1116     "base64_unittest.cc",
1117     "big_endian_unittest.cc",
1118     "bind_unittest.cc",
1119     "bind_unittest.nc",
1120     "bits_unittest.cc",
1121     "build_time_unittest.cc",
1122     "callback_helpers_unittest.cc",
1123     "callback_list_unittest.cc",
1124     "callback_list_unittest.nc",
1125     "callback_unittest.cc",
1126     "callback_unittest.nc",
1127     "cancelable_callback_unittest.cc",
1128     "command_line_unittest.cc",
1129     "containers/adapters_unittest.cc",
1130     "containers/hash_tables_unittest.cc",
1131     "containers/linked_list_unittest.cc",
1132     "containers/mru_cache_unittest.cc",
1133     "containers/small_map_unittest.cc",
1134     "containers/stack_container_unittest.cc",
1135     "cpu_unittest.cc",
1136     "debug/crash_logging_unittest.cc",
1137     "debug/leak_tracker_unittest.cc",
1138     "debug/proc_maps_linux_unittest.cc",
1139     "debug/stack_trace_unittest.cc",
1140     "debug/task_annotator_unittest.cc",
1141     "debug/trace_event_argument_unittest.cc",
1142     "debug/trace_event_memory_unittest.cc",
1143     "debug/trace_event_synthetic_delay_unittest.cc",
1144     "debug/trace_event_system_stats_monitor_unittest.cc",
1145     "debug/trace_event_unittest.cc",
1146     "debug/trace_event_unittest.h",
1147     "debug/trace_event_win_unittest.cc",
1148     "deferred_sequenced_task_runner_unittest.cc",
1149     "environment_unittest.cc",
1150     "file_version_info_unittest.cc",
1151     "files/dir_reader_posix_unittest.cc",
1152     "files/file_path_unittest.cc",
1153     "files/file_proxy_unittest.cc",
1154     "files/file_unittest.cc",
1155     "files/file_util_proxy_unittest.cc",
1156     "files/file_util_unittest.cc",
1157     "files/important_file_writer_unittest.cc",
1158     "files/scoped_temp_dir_unittest.cc",
1159     "gmock_unittest.cc",
1160     "guid_unittest.cc",
1161     "hash_unittest.cc",
1162     "id_map_unittest.cc",
1163     "i18n/break_iterator_unittest.cc",
1164     "i18n/char_iterator_unittest.cc",
1165     "i18n/case_conversion_unittest.cc",
1166     "i18n/file_util_icu_unittest.cc",
1167     "i18n/icu_string_conversions_unittest.cc",
1168     "i18n/number_formatting_unittest.cc",
1169     "i18n/rtl_unittest.cc",
1170     "i18n/streaming_utf8_validator_unittest.cc",
1171     "i18n/string_search_unittest.cc",
1172     "i18n/time_formatting_unittest.cc",
1173     "i18n/timezone_unittest.cc",
1174     "ios/device_util_unittest.mm",
1175     "json/json_parser_unittest.cc",
1176     "json/json_reader_unittest.cc",
1177     "json/json_value_converter_unittest.cc",
1178     "json/json_value_serializer_unittest.cc",
1179     "json/json_writer_unittest.cc",
1180     "json/string_escape_unittest.cc",
1181     "lazy_instance_unittest.cc",
1182     "logging_unittest.cc",
1183     "mac/bind_objc_block_unittest.mm",
1184     "mac/foundation_util_unittest.mm",
1185     "mac/libdispatch_task_runner_unittest.cc",
1186     "mac/mac_util_unittest.mm",
1187     "mac/objc_property_releaser_unittest.mm",
1188     "mac/scoped_nsobject_unittest.mm",
1189     "mac/scoped_objc_class_swizzler_unittest.mm",
1190     "mac/scoped_sending_event_unittest.mm",
1191     "md5_unittest.cc",
1192     "memory/aligned_memory_unittest.cc",
1193     "memory/discardable_memory_manager_unittest.cc",
1194     "memory/discardable_memory_unittest.cc",
1195     "memory/discardable_shared_memory_unittest.cc",
1196     "memory/linked_ptr_unittest.cc",
1197     "memory/ref_counted_memory_unittest.cc",
1198     "memory/ref_counted_unittest.cc",
1199     "memory/scoped_ptr_unittest.cc",
1200     "memory/scoped_ptr_unittest.nc",
1201     "memory/scoped_vector_unittest.cc",
1202     "memory/shared_memory_unittest.cc",
1203     "memory/singleton_unittest.cc",
1204     "memory/weak_ptr_unittest.cc",
1205     "memory/weak_ptr_unittest.nc",
1206     "message_loop/message_loop_proxy_impl_unittest.cc",
1207     "message_loop/message_loop_proxy_unittest.cc",
1208     "message_loop/message_loop_unittest.cc",
1209     "message_loop/message_pump_glib_unittest.cc",
1210     "message_loop/message_pump_io_ios_unittest.cc",
1211     "metrics/sample_map_unittest.cc",
1212     "metrics/sample_vector_unittest.cc",
1213     "metrics/bucket_ranges_unittest.cc",
1214     "metrics/field_trial_unittest.cc",
1215     "metrics/histogram_base_unittest.cc",
1216     "metrics/histogram_delta_serialization_unittest.cc",
1217     "metrics/histogram_snapshot_manager_unittest.cc",
1218     "metrics/histogram_unittest.cc",
1219     "metrics/sparse_histogram_unittest.cc",
1220     "metrics/stats_table_unittest.cc",
1221     "metrics/statistics_recorder_unittest.cc",
1222     "observer_list_unittest.cc",
1223     "os_compat_android_unittest.cc",
1224     "path_service_unittest.cc",
1225     "pickle_unittest.cc",
1226     "posix/file_descriptor_shuffle_unittest.cc",
1227     "posix/unix_domain_socket_linux_unittest.cc",
1228     "power_monitor/power_monitor_unittest.cc",
1229     "prefs/default_pref_store_unittest.cc",
1230     "prefs/json_pref_store_unittest.cc",
1231     "prefs/overlay_user_pref_store_unittest.cc",
1232     "prefs/pref_change_registrar_unittest.cc",
1233     "prefs/pref_member_unittest.cc",
1234     "prefs/pref_notifier_impl_unittest.cc",
1235     "prefs/pref_service_unittest.cc",
1236     "prefs/pref_value_map_unittest.cc",
1237     "prefs/pref_value_store_unittest.cc",
1238     "prefs/scoped_user_pref_update_unittest.cc",
1239     "process/memory_unittest.cc",
1240     "process/memory_unittest_mac.h",
1241     "process/memory_unittest_mac.mm",
1242     "process/process_metrics_unittest.cc",
1243     "process/process_metrics_unittest_ios.cc",
1244     "process/process_unittest.cc",
1245     "process/process_util_unittest.cc",
1246     "process/process_util_unittest_ios.cc",
1247     "profiler/tracked_time_unittest.cc",
1248     "rand_util_unittest.cc",
1249     "numerics/safe_numerics_unittest.cc",
1250     "scoped_clear_errno_unittest.cc",
1251     "scoped_generic_unittest.cc",
1252     "scoped_native_library_unittest.cc",
1253     "security_unittest.cc",
1254     "sequence_checker_unittest.cc",
1255     "sha1_unittest.cc",
1256     "stl_util_unittest.cc",
1257     "strings/nullable_string16_unittest.cc",
1258     "strings/safe_sprintf_unittest.cc",
1259     "strings/string16_unittest.cc",
1260     "strings/stringprintf_unittest.cc",
1261     "strings/string_number_conversions_unittest.cc",
1262     "strings/string_piece_unittest.cc",
1263     "strings/string_split_unittest.cc",
1264     "strings/string_tokenizer_unittest.cc",
1265     "strings/string_util_unittest.cc",
1266     "strings/stringize_macros_unittest.cc",
1267     "strings/sys_string_conversions_mac_unittest.mm",
1268     "strings/sys_string_conversions_unittest.cc",
1269     "strings/utf_offset_string_conversions_unittest.cc",
1270     "strings/utf_string_conversions_unittest.cc",
1271     "supports_user_data_unittest.cc",
1272     "sync_socket_unittest.cc",
1273     "synchronization/cancellation_flag_unittest.cc",
1274     "synchronization/condition_variable_unittest.cc",
1275     "synchronization/lock_unittest.cc",
1276     "synchronization/waitable_event_unittest.cc",
1277     "synchronization/waitable_event_watcher_unittest.cc",
1278     "sys_info_unittest.cc",
1279     "system_monitor/system_monitor_unittest.cc",
1280     "task/cancelable_task_tracker_unittest.cc",
1281     "task_runner_util_unittest.cc",
1282     "template_util_unittest.cc",
1283     "test/expectations/expectation_unittest.cc",
1284     "test/expectations/parser_unittest.cc",
1285     "test/histogram_tester_unittest.cc",
1286     "test/test_reg_util_win_unittest.cc",
1287     "test/trace_event_analyzer_unittest.cc",
1288     "threading/non_thread_safe_unittest.cc",
1289     "threading/platform_thread_unittest.cc",
1290     "threading/sequenced_worker_pool_unittest.cc",
1291     "threading/simple_thread_unittest.cc",
1292     "threading/thread_checker_unittest.cc",
1293     "threading/thread_collision_warner_unittest.cc",
1294     "threading/thread_id_name_manager_unittest.cc",
1295     "threading/thread_local_storage_unittest.cc",
1296     "threading/thread_local_unittest.cc",
1297     "threading/thread_unittest.cc",
1298     "threading/watchdog_unittest.cc",
1299     "threading/worker_pool_posix_unittest.cc",
1300     "threading/worker_pool_unittest.cc",
1301     "time/pr_time_unittest.cc",
1302     "time/time_unittest.cc",
1303     "time/time_win_unittest.cc",
1304     "timer/hi_res_timer_manager_unittest.cc",
1305     "timer/mock_timer_unittest.cc",
1306     "timer/timer_unittest.cc",
1307     "tools_sanity_unittest.cc",
1308     "tracked_objects_unittest.cc",
1309     "tuple_unittest.cc",
1310     "values_unittest.cc",
1311     "version_unittest.cc",
1312     "vlog_unittest.cc",
1313     "win/dllmain.cc",
1314     "win/enum_variant_unittest.cc",
1315     "win/event_trace_consumer_unittest.cc",
1316     "win/event_trace_controller_unittest.cc",
1317     "win/event_trace_provider_unittest.cc",
1318     "win/i18n_unittest.cc",
1319     "win/iunknown_impl_unittest.cc",
1320     "win/message_window_unittest.cc",
1321     "win/object_watcher_unittest.cc",
1322     "win/pe_image_unittest.cc",
1323     "win/registry_unittest.cc",
1324     "win/scoped_bstr_unittest.cc",
1325     "win/scoped_comptr_unittest.cc",
1326     "win/scoped_process_information_unittest.cc",
1327     "win/scoped_variant_unittest.cc",
1328     "win/shortcut_unittest.cc",
1329     "win/startup_information_unittest.cc",
1330     "win/win_util_unittest.cc",
1331     "win/wrapped_window_proc_unittest.cc",
1332   ]
1334   deps = [
1335     ":base",
1336     ":i18n",
1337     ":message_loop_tests",
1338     ":prefs",
1339     ":prefs_test_support",
1340     "//base/allocator",
1341     "//base/test:run_all_unittests",
1342     "//base/test:test_support",
1343     "//base/third_party/dynamic_annotations",
1344     "//testing/gmock",
1345     "//testing/gtest",
1346     "//third_party/icu",
1347   ]
1349   if (is_ios) {
1350     sources -= [
1351       "metrics/stats_table_uinittest.cc",  # Requires spawning a process.
1352       "process/memory_unittest.cc",
1353       "process/memory_unittest_mac.h",
1354       "process/memory_unittest_mac.mm",
1355       "process/process_unittest.cc",
1356       "process/process_util_unittest.cc",
1357     ]
1359     # Pull in specific Mac files for iOS (which have been filtered out by file
1360     # name rules).
1361     set_sources_assignment_filter([])
1362     sources += [
1363       "mac/bind_objc_block_unittest.mm",
1364       "mac/foundation_util_unittest.mm",
1365       "mac/objc_property_releaser_unittest.mm",
1366       "mac/scoped_nsobject_unittest.mm",
1367       "sys_string_conversions_mac_unittest.mm",
1368     ]
1369     set_sources_assignment_filter(sources_assignment_filter)
1371     # TODO(GYP): dep on copy_test_data_ios action.
1372   }
1374   if (is_linux) {
1375     sources -= [ "file_version_info_unittest.cc" ]
1376     sources += [ "nix/xdg_util_unittest.cc" ]
1377     defines = [ "USE_SYMBOLIZE" ]
1378     configs += [ "//build/config/linux:glib" ]
1379   }
1381   if (!is_linux || use_ozone) {
1382     sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1383   }
1385   if (is_posix || is_ios) {
1386     sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1387     deps += [ "//third_party/libevent" ]
1388   }
1390   if (is_android) {
1391     deps += [
1392       "//testing/android:native_test_native_code",
1393     ]
1394     set_sources_assignment_filter([])
1395     sources += [ "debug/proc_maps_linux_unittest.cc" ]
1396     set_sources_assignment_filter(sources_assignment_filter)
1397   }
1400 if (is_android) {
1401   # GYP: //base.gyp:base_jni_headers
1402   generate_jni("base_jni_headers") {
1403     sources = [
1404       "android/java/src/org/chromium/base/ApplicationStatus.java",
1405       "android/java/src/org/chromium/base/BuildInfo.java",
1406       "android/java/src/org/chromium/base/CommandLine.java",
1407       "android/java/src/org/chromium/base/ContentUriUtils.java",
1408       "android/java/src/org/chromium/base/CpuFeatures.java",
1409       "android/java/src/org/chromium/base/EventLog.java",
1410       "android/java/src/org/chromium/base/FieldTrialList.java",
1411       "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
1412       "android/java/src/org/chromium/base/JNIUtils.java",
1413       "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
1414       "android/java/src/org/chromium/base/LocaleUtils.java",
1415       "android/java/src/org/chromium/base/MemoryPressureListener.java",
1416       "android/java/src/org/chromium/base/JavaHandlerThread.java",
1417       "android/java/src/org/chromium/base/PathService.java",
1418       "android/java/src/org/chromium/base/PathUtils.java",
1419       "android/java/src/org/chromium/base/PowerMonitor.java",
1420       "android/java/src/org/chromium/base/SystemMessageHandler.java",
1421       "android/java/src/org/chromium/base/SysUtils.java",
1422       "android/java/src/org/chromium/base/ThreadUtils.java",
1423       "android/java/src/org/chromium/base/TraceEvent.java",
1424     ]
1425     jni_package = "base"
1426   }
1428   # GYP: //base.gyp:base_java
1429   android_library("base_java") {
1430     srcjar_deps = [
1431       ":base_android_java_enums_srcjar",
1432       ":base_native_libraries_gen",
1433     ]
1435     deps = [
1436       "//third_party/jsr-305:jsr_305_javalib"
1437     ]
1439     DEPRECATED_java_in_dir = "android/java/src"
1441     # A new version of NativeLibraries.java (with the actual correct values)
1442     # will be created when creating an apk.
1443     jar_excluded_patterns = [
1444       "*/NativeLibraries.class",
1445       "*/NativeLibraries##*.class",
1446     ]
1447   }
1449   # GYP: //base.gyp:base_javatests
1450   android_library("base_javatests") {
1451     deps = [
1452       ":base_java",
1453       ":base_java_test_support",
1454     ]
1455     DEPRECATED_java_in_dir = "android/javatests/src"
1456   }
1458   # GYP: //base.gyp:base_java_test_support
1459   android_library("base_java_test_support") {
1460     deps = [
1461       ":base_java",
1462     ]
1463     DEPRECATED_java_in_dir = "test/android/javatests/src"
1464   }
1466   # GYP: //base.gyp:base_java_application_state
1467   # GYP: //base.gyp:base_java_library_load_from_apk_status_codes
1468   # GYP: //base.gyp:base_java_memory_pressure_level
1469   java_cpp_enum("base_android_java_enums_srcjar") {
1470     sources = [
1471       "android/application_status_listener.h",
1472       "android/library_loader/library_load_from_apk_status_codes.h",
1473       "memory/memory_pressure_listener.h",
1474     ]
1475     outputs = [
1476       "org/chromium/base/ApplicationState.java",
1477       "org/chromium/base/library_loader/LibraryLoadFromApkStatusCodes.java",
1478       "org/chromium/base/MemoryPressureLevel.java",
1479     ]
1480   }
1482   # GYP: //base/base.gyp:base_native_libraries_gen
1483   java_cpp_template("base_native_libraries_gen") {
1484     sources = [
1485       "android/java/templates/NativeLibraries.template",
1486     ]
1487     package_name = "org/chromium/base/library_loader"
1488   }
1490   # GYP: //base.gyp:base_java_unittest_support
1491   android_library("base_java_unittest_support") {
1492     deps = [":base_java"]
1493     java_files = [
1494       "test/android/java/src/org/chromium/base/ContentUriTestUtils.java"
1495     ]
1496   }
1498   # GYP: //base.gyp:base_unittests_apk
1499   unittest_apk("base_unittests_apk") {
1500     deps = [
1501       ":base_java",
1502       ":base_java_unittest_support",
1503       ":base_unittests",
1504     ]
1505     unittests_dep = ":base_unittests"
1506   }