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