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