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