Revert of xp: copy dbghelp.dll to output dir and have base.isolate use it there ...
[chromium-blink-merge.git] / base / BUILD.gn
blob9b5e471187f52a5e1d71398486579f2042c4cea1
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_maps.cc",
680     "trace_event/process_memory_maps.h",
681     "trace_event/process_memory_maps_dump_provider.cc",
682     "trace_event/process_memory_maps_dump_provider.h",
683     "trace_event/process_memory_totals.cc",
684     "trace_event/process_memory_totals.h",
685     "trace_event/process_memory_totals_dump_provider.cc",
686     "trace_event/process_memory_totals_dump_provider.h",
687     "trace_event/trace_event.h",
688     "trace_event/trace_event_android.cc",
689     "trace_event/trace_event_argument.cc",
690     "trace_event/trace_event_argument.h",
691     "trace_event/trace_event_impl.cc",
692     "trace_event/trace_event_impl.h",
693     "trace_event/trace_event_impl_constants.cc",
694     "trace_event/trace_event_memory.cc",
695     "trace_event/trace_event_memory.h",
696     "trace_event/trace_event_synthetic_delay.cc",
697     "trace_event/trace_event_synthetic_delay.h",
698     "trace_event/trace_event_system_stats_monitor.cc",
699     "trace_event/trace_event_system_stats_monitor.h",
700     "trace_event/trace_event_win.cc",
701     "trace_event/trace_event_win.h",
702     "tracked_objects.cc",
703     "tracked_objects.h",
704     "tracking_info.cc",
705     "tracking_info.h",
706     "tuple.h",
707     "value_conversions.cc",
708     "value_conversions.h",
709     "values.cc",
710     "values.h",
711     "version.cc",
712     "version.h",
713     "vlog.cc",
714     "vlog.h",
715     "win/enum_variant.cc",
716     "win/enum_variant.h",
717     "win/event_trace_consumer.h",
718     "win/event_trace_controller.cc",
719     "win/event_trace_controller.h",
720     "win/event_trace_provider.cc",
721     "win/event_trace_provider.h",
722     "win/i18n.cc",
723     "win/i18n.h",
724     "win/iat_patch_function.cc",
725     "win/iat_patch_function.h",
726     "win/iunknown_impl.cc",
727     "win/iunknown_impl.h",
728     "win/message_window.cc",
729     "win/message_window.h",
730     "win/metro.cc",
731     "win/metro.h",
732     "win/object_watcher.cc",
733     "win/object_watcher.h",
734     "win/registry.cc",
735     "win/registry.h",
736     "win/resource_util.cc",
737     "win/resource_util.h",
738     "win/scoped_bstr.cc",
739     "win/scoped_bstr.h",
740     "win/scoped_co_mem.h",
741     "win/scoped_com_initializer.h",
742     "win/scoped_comptr.h",
743     "win/scoped_gdi_object.h",
744     "win/scoped_handle.cc",
745     "win/scoped_handle.h",
746     "win/scoped_hdc.h",
747     "win/scoped_hglobal.h",
748     "win/scoped_process_information.cc",
749     "win/scoped_process_information.h",
750     "win/scoped_propvariant.h",
751     "win/scoped_select_object.h",
752     "win/scoped_variant.cc",
753     "win/scoped_variant.h",
754     "win/shortcut.cc",
755     "win/shortcut.h",
756     "win/startup_information.cc",
757     "win/startup_information.h",
758     "win/win_util.cc",
759     "win/win_util.h",
760     "win/windows_version.cc",
761     "win/windows_version.h",
762     "win/wrapped_window_proc.cc",
763     "win/wrapped_window_proc.h",
764   ]
766   if (is_nacl) {
767     sources += [ "files/file_path_watcher_stub.cc" ]
768   }
770   sources -= [
771     "process/process_handle_freebsd.cc",
772     "process/process_handle_openbsd.cc",
773     "process/process_iterator_freebsd.cc",
774     "process/process_iterator_openbsd.cc",
775     "process/process_metrics_freebsd.cc",
776     "process/process_metrics_openbsd.cc",
777     "sys_info_freebsd.cc",
778     "sys_info_openbsd.cc",
779   ]
781   defines = [ "BASE_IMPLEMENTATION" ]
783   deps = [
784     ":base_static",
785     "//base/allocator:allocator_extension_thunks",
786     "//base/third_party/dynamic_annotations",
787     "//base/third_party/nspr",
788     "//third_party/modp_b64",
789   ]
791   # Allow more direct string conversions on platforms with native utf8
792   # strings
793   if (is_mac || is_ios || is_chromeos) {
794     defines += [ "SYSTEM_NATIVE_UTF8" ]
795   }
797   if (is_android) {
798     sources += [
799       "memory/discardable_memory_ashmem.cc",
800       "memory/discardable_memory_ashmem.h",
801       "memory/discardable_memory_ashmem_allocator.cc",
802       "memory/discardable_memory_ashmem_allocator.h",
803     ]
804     sources -= [
805       "base_paths_posix.cc",
806       "power_monitor/power_monitor_device_source_posix.cc",
807     ]
809     # Android uses some Linux sources, put those back.
810     set_sources_assignment_filter([])
811     sources += [
812       "debug/proc_maps_linux.cc",
813       "files/file_path_watcher_linux.cc",
814       "posix/unix_domain_socket_linux.cc",
815       "process/internal_linux.cc",
816       "process/memory_linux.cc",
817       "process/process_handle_linux.cc",
818       "process/process_iterator_linux.cc",
819       "process/process_metrics_linux.cc",
820       "sys_info_linux.cc",
821     ]
822     set_sources_assignment_filter(sources_assignment_filter)
824     deps += [
825       ":base_jni_headers",
826       "//third_party/ashmem",
827       "//third_party/android_tools:cpu_features",
828     ]
830     # logging.cc uses the Android logging library.
831     libs = [ "log" ]
833     sources -= [ "debug/stack_trace_posix.cc" ]
834   }
836   if (is_chromeos) {
837     sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ]
838   }
840   if (is_nacl) {
841     # These things would otherwise be built on a Posix build but aren't
842     # supported on NaCl.
843     sources -= [
844       "debug/stack_trace_posix.cc",
845       "files/file_enumerator_posix.cc",
846       "files/file_util_posix.cc",
847       "memory/shared_memory_posix.cc",
848       "message_loop/message_pump_libevent.cc",
849       "metrics/field_trial.cc",
850       "native_library_posix.cc",
851       "process/kill_posix.cc",
852       "process/launch_posix.cc",
853       "process/process_metrics_posix.cc",
854       "process/process_posix.cc",
855       "sync_socket_posix.cc",
856       "sys_info_posix.cc",
857     ]
858   } else {
859     # Remove nacl stuff.
860     sources -= [
861       "memory/shared_memory_nacl.cc",
862       "os_compat_nacl.cc",
863       "os_compat_nacl.h",
864       "rand_util_nacl.cc",
865     ]
866   }
868   # Windows.
869   if (is_win) {
870     sources -= [
871       "message_loop/message_pump_libevent.cc",
872       "strings/string16.cc",
874       # Not using sha1_win.cc because it may have caused a
875       # regression to page cycler moz.
876       "sha1_win.cc",
877     ]
879     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
880     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
882     libs = [
883       "cfgmgr32.lib",
884       "netapi32.lib",
885       "powrprof.lib",
886       "setupapi.lib",
887     ]
888     ldflags = [
889       "/DELAYLOAD:cfgmgr32.dll",
890       "/DELAYLOAD:powrprof.dll",
891       "/DELAYLOAD:setupapi.dll",
892     ]
893   } else if (!is_nacl) {
894     # Non-Windows.
895     deps += [ "//third_party/libevent" ]
896   }
898   # Mac.
899   if (is_mac) {
900     sources += [
901       "memory/discardable_memory_mach.cc",
902       "memory/discardable_memory_mach.h",
903     ]
904     sources -= [
905       "base_paths_posix.cc",
906       "native_library_posix.cc",
907       "strings/sys_string_conversions_posix.cc",
908     ]
909   } else {
910     # Non-Mac.
911     sources -= [
912       "files/file_path_watcher_fsevents.cc",
913       "files/file_path_watcher_fsevents.h",
914       "files/file_path_watcher_kqueue.cc",
915       "files/file_path_watcher_kqueue.h",
916     ]
917   }
919   # Linux.
920   if (is_linux) {
921     # TODO(brettw) this will need to be parameterized at some point.
922     linux_configs = []
923     if (use_glib) {
924       linux_configs += [ "//build/config/linux:glib" ]
925     }
927     configs += linux_configs
928     all_dependent_configs = linux_configs
930     defines += [ "USE_SYMBOLIZE" ]
932     # These dependencies are not required on Android, and in the case
933     # of xdg_mime must be excluded due to licensing restrictions.
934     deps += [
935       "//base/third_party/symbolize",
936       "//base/third_party/xdg_mime",
937       "//base/third_party/xdg_user_dirs",
938     ]
939   } else {
940     # Non-Linux.
941     sources -= [
942       "nix/mime_util_xdg.cc",
943       "nix/mime_util_xdg.h",
944       "nix/xdg_util.cc",
945       "nix/xdg_util.h",
946     ]
948     if (!is_android) {
949       sources -= [
950         "linux_util.cc",
951         "linux_util.h",
952       ]
953     }
954   }
956   if (!use_glib) {
957     sources -= [
958       "message_loop/message_pump_glib.cc",
959       "message_loop/message_pump_glib.h",
960     ]
961   }
963   configs += [ "//build/config/compiler:wexit_time_destructors" ]
964   if (is_android && !is_debug) {
965     configs -= [ "//build/config/compiler:optimize" ]
966     configs += [ "//build/config/compiler:optimize_max" ]
967   }
970 # This is the subset of files from base that should not be used with a dynamic
971 # library. Note that this library cannot depend on base because base depends on
972 # base_static.
973 source_set("base_static") {
974   sources = [
975     "base_switches.cc",
976     "base_switches.h",
977     "win/pe_image.cc",
978     "win/pe_image.h",
979   ]
981   if (is_android && !is_debug) {
982     configs -= [ "//build/config/compiler:optimize" ]
983     configs += [ "//build/config/compiler:optimize_max" ]
984   }
987 component("i18n") {
988   output_name = "base_i18n"
989   sources = [
990     "i18n/base_i18n_export.h",
991     "i18n/bidi_line_iterator.cc",
992     "i18n/bidi_line_iterator.h",
993     "i18n/break_iterator.cc",
994     "i18n/break_iterator.h",
995     "i18n/case_conversion.cc",
996     "i18n/case_conversion.h",
997     "i18n/char_iterator.cc",
998     "i18n/char_iterator.h",
999     "i18n/file_util_icu.cc",
1000     "i18n/file_util_icu.h",
1001     "i18n/i18n_constants.cc",
1002     "i18n/i18n_constants.h",
1003     "i18n/icu_encoding_detection.cc",
1004     "i18n/icu_encoding_detection.h",
1005     "i18n/icu_string_conversions.cc",
1006     "i18n/icu_string_conversions.h",
1007     "i18n/icu_util.cc",
1008     "i18n/icu_util.h",
1009     "i18n/number_formatting.cc",
1010     "i18n/number_formatting.h",
1011     "i18n/rtl.cc",
1012     "i18n/rtl.h",
1013     "i18n/streaming_utf8_validator.cc",
1014     "i18n/streaming_utf8_validator.h",
1015     "i18n/string_compare.cc",
1016     "i18n/string_compare.h",
1017     "i18n/string_search.cc",
1018     "i18n/string_search.h",
1019     "i18n/time_formatting.cc",
1020     "i18n/time_formatting.h",
1021     "i18n/timezone.cc",
1022     "i18n/timezone.h",
1023     "i18n/utf8_validator_tables.cc",
1024     "i18n/utf8_validator_tables.h",
1025   ]
1026   defines = [ "BASE_I18N_IMPLEMENTATION" ]
1027   configs += [ "//build/config/compiler:wexit_time_destructors" ]
1028   deps = [
1029     ":base",
1030     "//base/third_party/dynamic_annotations",
1031     "//third_party/icu",
1032   ]
1034   if (is_android && !is_debug) {
1035     configs -= [ "//build/config/compiler:optimize" ]
1036     configs += [ "//build/config/compiler:optimize_max" ]
1037   }
1039   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1040   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1043 source_set("prefs") {
1044   sources = [
1045     "prefs/base_prefs_export.h",
1046     "prefs/default_pref_store.cc",
1047     "prefs/default_pref_store.h",
1048     "prefs/json_pref_store.cc",
1049     "prefs/json_pref_store.h",
1050     "prefs/overlay_user_pref_store.cc",
1051     "prefs/overlay_user_pref_store.h",
1052     "prefs/persistent_pref_store.h",
1053     "prefs/pref_change_registrar.cc",
1054     "prefs/pref_change_registrar.h",
1055     "prefs/pref_filter.h",
1056     "prefs/pref_member.cc",
1057     "prefs/pref_member.h",
1058     "prefs/pref_notifier.h",
1059     "prefs/pref_notifier_impl.cc",
1060     "prefs/pref_notifier_impl.h",
1061     "prefs/pref_observer.h",
1062     "prefs/pref_registry.cc",
1063     "prefs/pref_registry.h",
1064     "prefs/pref_registry_simple.cc",
1065     "prefs/pref_registry_simple.h",
1066     "prefs/pref_service.cc",
1067     "prefs/pref_service.h",
1068     "prefs/pref_service_factory.cc",
1069     "prefs/pref_service_factory.h",
1070     "prefs/pref_store.cc",
1071     "prefs/pref_store.h",
1072     "prefs/pref_value_map.cc",
1073     "prefs/pref_value_map.h",
1074     "prefs/pref_value_store.cc",
1075     "prefs/pref_value_store.h",
1076     "prefs/scoped_user_pref_update.cc",
1077     "prefs/scoped_user_pref_update.h",
1078     "prefs/value_map_pref_store.cc",
1079     "prefs/value_map_pref_store.h",
1080     "prefs/writeable_pref_store.h",
1081   ]
1083   defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1085   deps = [
1086     ":base",
1087   ]
1089   if (is_android && !is_debug) {
1090     configs -= [ "//build/config/compiler:optimize" ]
1091     configs += [ "//build/config/compiler:optimize_max" ]
1092   }
1095 source_set("prefs_test_support") {
1096   testonly = true
1097   sources = [
1098     "prefs/mock_pref_change_callback.cc",
1099     "prefs/mock_pref_change_callback.h",
1100     "prefs/pref_store_observer_mock.cc",
1101     "prefs/pref_store_observer_mock.h",
1102     "prefs/testing_pref_service.cc",
1103     "prefs/testing_pref_service.h",
1104     "prefs/testing_pref_store.cc",
1105     "prefs/testing_pref_store.h",
1106   ]
1108   public_deps = [
1109     ":prefs",
1110   ]
1111   deps = [
1112     ":base",
1113     "//testing/gmock",
1114     "//testing/gtest",
1115   ]
1118 source_set("message_loop_tests") {
1119   testonly = true
1120   sources = [
1121     "message_loop/message_loop_test.cc",
1122     "message_loop/message_loop_test.h",
1123   ]
1125   deps = [
1126     ":base",
1127     "//testing/gtest",
1128   ]
1131 # TODO(pasko): Remove this target when crbug.com/424562 is fixed.
1132 source_set("protect_file_posix") {
1133   sources = [
1134     "files/protect_file_posix.cc",
1135   ]
1137   deps = [
1138     "//base",
1139   ]
1142 test("base_unittests") {
1143   sources = [
1144     "android/application_status_listener_unittest.cc",
1145     "android/content_uri_utils_unittest.cc",
1146     "android/jni_android_unittest.cc",
1147     "android/jni_array_unittest.cc",
1148     "android/jni_string_unittest.cc",
1149     "android/path_utils_unittest.cc",
1150     "android/scoped_java_ref_unittest.cc",
1151     "android/sys_utils_unittest.cc",
1152     "async_socket_io_handler_unittest.cc",
1153     "at_exit_unittest.cc",
1154     "atomicops_unittest.cc",
1155     "barrier_closure_unittest.cc",
1156     "base64_unittest.cc",
1157     "big_endian_unittest.cc",
1158     "bind_unittest.cc",
1159     "bind_unittest.nc",
1160     "bits_unittest.cc",
1161     "build_time_unittest.cc",
1162     "callback_helpers_unittest.cc",
1163     "callback_list_unittest.cc",
1164     "callback_list_unittest.nc",
1165     "callback_unittest.cc",
1166     "callback_unittest.nc",
1167     "cancelable_callback_unittest.cc",
1168     "chromeos/memory_pressure_observer_chromeos_unittest.cc",
1169     "command_line_unittest.cc",
1170     "containers/adapters_unittest.cc",
1171     "containers/hash_tables_unittest.cc",
1172     "containers/linked_list_unittest.cc",
1173     "containers/mru_cache_unittest.cc",
1174     "containers/small_map_unittest.cc",
1175     "containers/stack_container_unittest.cc",
1176     "cpu_unittest.cc",
1177     "debug/crash_logging_unittest.cc",
1178     "debug/debugger_unittest.cc",
1179     "debug/leak_tracker_unittest.cc",
1180     "debug/proc_maps_linux_unittest.cc",
1181     "debug/stack_trace_unittest.cc",
1182     "debug/task_annotator_unittest.cc",
1183     "deferred_sequenced_task_runner_unittest.cc",
1184     "environment_unittest.cc",
1185     "file_version_info_unittest.cc",
1186     "files/dir_reader_posix_unittest.cc",
1187     "files/file_path_unittest.cc",
1188     "files/file_proxy_unittest.cc",
1189     "files/file_unittest.cc",
1190     "files/file_util_proxy_unittest.cc",
1191     "files/file_util_unittest.cc",
1192     "files/important_file_writer_unittest.cc",
1193     "files/scoped_temp_dir_unittest.cc",
1194     "gmock_unittest.cc",
1195     "guid_unittest.cc",
1196     "hash_unittest.cc",
1197     "i18n/break_iterator_unittest.cc",
1198     "i18n/case_conversion_unittest.cc",
1199     "i18n/char_iterator_unittest.cc",
1200     "i18n/file_util_icu_unittest.cc",
1201     "i18n/icu_string_conversions_unittest.cc",
1202     "i18n/number_formatting_unittest.cc",
1203     "i18n/rtl_unittest.cc",
1204     "i18n/streaming_utf8_validator_unittest.cc",
1205     "i18n/string_search_unittest.cc",
1206     "i18n/time_formatting_unittest.cc",
1207     "i18n/timezone_unittest.cc",
1208     "id_map_unittest.cc",
1209     "ios/device_util_unittest.mm",
1210     "ios/weak_nsobject_unittest.mm",
1211     "json/json_parser_unittest.cc",
1212     "json/json_reader_unittest.cc",
1213     "json/json_value_converter_unittest.cc",
1214     "json/json_value_serializer_unittest.cc",
1215     "json/json_writer_unittest.cc",
1216     "json/string_escape_unittest.cc",
1217     "lazy_instance_unittest.cc",
1218     "logging_unittest.cc",
1219     "mac/bind_objc_block_unittest.mm",
1220     "mac/foundation_util_unittest.mm",
1221     "mac/libdispatch_task_runner_unittest.cc",
1222     "mac/mac_util_unittest.mm",
1223     "mac/objc_property_releaser_unittest.mm",
1224     "mac/scoped_nsobject_unittest.mm",
1225     "mac/scoped_objc_class_swizzler_unittest.mm",
1226     "mac/scoped_sending_event_unittest.mm",
1227     "md5_unittest.cc",
1228     "memory/aligned_memory_unittest.cc",
1229     "memory/discardable_memory_manager_unittest.cc",
1230     "memory/discardable_memory_unittest.cc",
1231     "memory/discardable_shared_memory_unittest.cc",
1232     "memory/linked_ptr_unittest.cc",
1233     "memory/ref_counted_memory_unittest.cc",
1234     "memory/ref_counted_unittest.cc",
1235     "memory/scoped_ptr_unittest.cc",
1236     "memory/scoped_ptr_unittest.nc",
1237     "memory/scoped_vector_unittest.cc",
1238     "memory/shared_memory_unittest.cc",
1239     "memory/singleton_unittest.cc",
1240     "memory/weak_ptr_unittest.cc",
1241     "memory/weak_ptr_unittest.nc",
1242     "message_loop/message_loop_proxy_impl_unittest.cc",
1243     "message_loop/message_loop_proxy_unittest.cc",
1244     "message_loop/message_loop_unittest.cc",
1245     "message_loop/message_pump_glib_unittest.cc",
1246     "message_loop/message_pump_io_ios_unittest.cc",
1247     "metrics/bucket_ranges_unittest.cc",
1248     "metrics/field_trial_unittest.cc",
1249     "metrics/histogram_base_unittest.cc",
1250     "metrics/histogram_delta_serialization_unittest.cc",
1251     "metrics/histogram_snapshot_manager_unittest.cc",
1252     "metrics/histogram_unittest.cc",
1253     "metrics/sample_map_unittest.cc",
1254     "metrics/sample_vector_unittest.cc",
1255     "metrics/sparse_histogram_unittest.cc",
1256     "metrics/statistics_recorder_unittest.cc",
1257     "numerics/safe_numerics_unittest.cc",
1258     "observer_list_unittest.cc",
1259     "os_compat_android_unittest.cc",
1260     "path_service_unittest.cc",
1261     "pickle_unittest.cc",
1262     "posix/file_descriptor_shuffle_unittest.cc",
1263     "posix/unix_domain_socket_linux_unittest.cc",
1264     "power_monitor/power_monitor_unittest.cc",
1265     "prefs/default_pref_store_unittest.cc",
1266     "prefs/json_pref_store_unittest.cc",
1267     "prefs/overlay_user_pref_store_unittest.cc",
1268     "prefs/pref_change_registrar_unittest.cc",
1269     "prefs/pref_member_unittest.cc",
1270     "prefs/pref_notifier_impl_unittest.cc",
1271     "prefs/pref_service_unittest.cc",
1272     "prefs/pref_value_map_unittest.cc",
1273     "prefs/pref_value_store_unittest.cc",
1274     "prefs/scoped_user_pref_update_unittest.cc",
1275     "process/memory_unittest.cc",
1276     "process/memory_unittest_mac.h",
1277     "process/memory_unittest_mac.mm",
1278     "process/process_metrics_unittest.cc",
1279     "process/process_metrics_unittest_ios.cc",
1280     "process/process_unittest.cc",
1281     "process/process_util_unittest.cc",
1282     "process/process_util_unittest_ios.cc",
1283     "profiler/tracked_time_unittest.cc",
1284     "rand_util_unittest.cc",
1285     "scoped_clear_errno_unittest.cc",
1286     "scoped_generic_unittest.cc",
1287     "scoped_native_library_unittest.cc",
1288     "security_unittest.cc",
1289     "sequence_checker_unittest.cc",
1290     "sha1_unittest.cc",
1291     "stl_util_unittest.cc",
1292     "strings/nullable_string16_unittest.cc",
1293     "strings/safe_sprintf_unittest.cc",
1294     "strings/string16_unittest.cc",
1295     "strings/string_number_conversions_unittest.cc",
1296     "strings/string_piece_unittest.cc",
1297     "strings/string_split_unittest.cc",
1298     "strings/string_tokenizer_unittest.cc",
1299     "strings/string_util_unittest.cc",
1300     "strings/stringize_macros_unittest.cc",
1301     "strings/stringprintf_unittest.cc",
1302     "strings/sys_string_conversions_mac_unittest.mm",
1303     "strings/sys_string_conversions_unittest.cc",
1304     "strings/utf_offset_string_conversions_unittest.cc",
1305     "strings/utf_string_conversions_unittest.cc",
1306     "supports_user_data_unittest.cc",
1307     "sync_socket_unittest.cc",
1308     "synchronization/cancellation_flag_unittest.cc",
1309     "synchronization/condition_variable_unittest.cc",
1310     "synchronization/lock_unittest.cc",
1311     "synchronization/waitable_event_unittest.cc",
1312     "synchronization/waitable_event_watcher_unittest.cc",
1313     "sys_info_unittest.cc",
1314     "system_monitor/system_monitor_unittest.cc",
1315     "task/cancelable_task_tracker_unittest.cc",
1316     "task_runner_util_unittest.cc",
1317     "template_util_unittest.cc",
1318     "test/expectations/expectation_unittest.cc",
1319     "test/expectations/parser_unittest.cc",
1320     "test/histogram_tester_unittest.cc",
1321     "test/test_reg_util_win_unittest.cc",
1322     "test/trace_event_analyzer_unittest.cc",
1323     "threading/non_thread_safe_unittest.cc",
1324     "threading/platform_thread_unittest.cc",
1325     "threading/sequenced_worker_pool_unittest.cc",
1326     "threading/simple_thread_unittest.cc",
1327     "threading/thread_checker_unittest.cc",
1328     "threading/thread_collision_warner_unittest.cc",
1329     "threading/thread_id_name_manager_unittest.cc",
1330     "threading/thread_local_storage_unittest.cc",
1331     "threading/thread_local_unittest.cc",
1332     "threading/thread_unittest.cc",
1333     "threading/watchdog_unittest.cc",
1334     "threading/worker_pool_posix_unittest.cc",
1335     "threading/worker_pool_unittest.cc",
1336     "time/pr_time_unittest.cc",
1337     "time/time_unittest.cc",
1338     "time/time_win_unittest.cc",
1339     "timer/hi_res_timer_manager_unittest.cc",
1340     "timer/mock_timer_unittest.cc",
1341     "timer/timer_unittest.cc",
1342     "tools_sanity_unittest.cc",
1343     "trace_event/memory_dump_manager_unittest.cc",
1344     "trace_event/process_memory_maps_dump_provider_unittest.cc",
1345     "trace_event/process_memory_totals_dump_provider_unittest.cc",
1346     "trace_event/trace_event_argument_unittest.cc",
1347     "trace_event/trace_event_memory_unittest.cc",
1348     "trace_event/trace_event_synthetic_delay_unittest.cc",
1349     "trace_event/trace_event_system_stats_monitor_unittest.cc",
1350     "trace_event/trace_event_unittest.cc",
1351     "trace_event/trace_event_win_unittest.cc",
1352     "tracked_objects_unittest.cc",
1353     "tuple_unittest.cc",
1354     "values_unittest.cc",
1355     "version_unittest.cc",
1356     "vlog_unittest.cc",
1357     "win/dllmain.cc",
1358     "win/enum_variant_unittest.cc",
1359     "win/event_trace_consumer_unittest.cc",
1360     "win/event_trace_controller_unittest.cc",
1361     "win/event_trace_provider_unittest.cc",
1362     "win/i18n_unittest.cc",
1363     "win/iunknown_impl_unittest.cc",
1364     "win/message_window_unittest.cc",
1365     "win/object_watcher_unittest.cc",
1366     "win/pe_image_unittest.cc",
1367     "win/registry_unittest.cc",
1368     "win/scoped_bstr_unittest.cc",
1369     "win/scoped_comptr_unittest.cc",
1370     "win/scoped_process_information_unittest.cc",
1371     "win/scoped_variant_unittest.cc",
1372     "win/shortcut_unittest.cc",
1373     "win/startup_information_unittest.cc",
1374     "win/win_util_unittest.cc",
1375     "win/wrapped_window_proc_unittest.cc",
1376   ]
1378   deps = [
1379     ":base",
1380     ":i18n",
1381     ":message_loop_tests",
1382     ":prefs",
1383     ":prefs_test_support",
1384     "//base/allocator",
1385     "//base/test:run_all_unittests",
1386     "//base/test:test_support",
1387     "//base/third_party/dynamic_annotations",
1388     "//base/third_party/nspr",
1389     "//testing/gmock",
1390     "//testing/gtest",
1391     "//third_party/icu",
1392   ]
1394   if (is_android) {
1395     apk_deps = [
1396       ":base_java",
1397       ":base_java_unittest_support",
1398     ]
1399   }
1401   if (is_ios) {
1402     sources -= [
1403       "process/memory_unittest.cc",
1404       "process/memory_unittest_mac.h",
1405       "process/memory_unittest_mac.mm",
1406       "process/process_unittest.cc",
1407       "process/process_util_unittest.cc",
1408     ]
1410     # Pull in specific Mac files for iOS (which have been filtered out by file
1411     # name rules).
1412     set_sources_assignment_filter([])
1413     sources += [
1414       "mac/bind_objc_block_unittest.mm",
1415       "mac/foundation_util_unittest.mm",
1416       "mac/objc_property_releaser_unittest.mm",
1417       "mac/scoped_nsobject_unittest.mm",
1418       "sys_string_conversions_mac_unittest.mm",
1419     ]
1420     set_sources_assignment_filter(sources_assignment_filter)
1422     # TODO(GYP): dep on copy_test_data_ios action.
1423   }
1425   if (is_linux) {
1426     sources -= [ "file_version_info_unittest.cc" ]
1427     sources += [ "nix/xdg_util_unittest.cc" ]
1428     defines = [ "USE_SYMBOLIZE" ]
1429     if (use_glib) {
1430       configs += [ "//build/config/linux:glib" ]
1431     }
1432   }
1434   if (!is_linux || use_ozone) {
1435     sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1436   }
1438   if (is_posix || is_ios) {
1439     sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1440     deps += [ "//third_party/libevent" ]
1441   }
1443   if (is_android) {
1444     deps += [ "//testing/android:native_test_native_code" ]
1445     set_sources_assignment_filter([])
1446     sources += [ "debug/proc_maps_linux_unittest.cc" ]
1447     set_sources_assignment_filter(sources_assignment_filter)
1448   }
1450   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1451   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1454 if (is_android) {
1455   # GYP: //base.gyp:base_jni_headers
1456   generate_jni("base_jni_headers") {
1457     sources = [
1458       "android/java/src/org/chromium/base/ApplicationStatus.java",
1459       "android/java/src/org/chromium/base/BuildInfo.java",
1460       "android/java/src/org/chromium/base/CommandLine.java",
1461       "android/java/src/org/chromium/base/ContentUriUtils.java",
1462       "android/java/src/org/chromium/base/CpuFeatures.java",
1463       "android/java/src/org/chromium/base/EventLog.java",
1464       "android/java/src/org/chromium/base/FieldTrialList.java",
1465       "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
1466       "android/java/src/org/chromium/base/JNIUtils.java",
1467       "android/java/src/org/chromium/base/JavaHandlerThread.java",
1468       "android/java/src/org/chromium/base/LocaleUtils.java",
1469       "android/java/src/org/chromium/base/MemoryPressureListener.java",
1470       "android/java/src/org/chromium/base/PathService.java",
1471       "android/java/src/org/chromium/base/PathUtils.java",
1472       "android/java/src/org/chromium/base/PowerMonitor.java",
1473       "android/java/src/org/chromium/base/SysUtils.java",
1474       "android/java/src/org/chromium/base/SystemMessageHandler.java",
1475       "android/java/src/org/chromium/base/ThreadUtils.java",
1476       "android/java/src/org/chromium/base/TraceEvent.java",
1477       "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
1478       "android/java/src/org/chromium/base/metrics/RecordHistogram.java",
1479     ]
1480     jni_package = "base"
1481   }
1483   # GYP: //base.gyp:base_java
1484   android_library("base_java") {
1485     srcjar_deps = [
1486       ":base_android_java_enums_srcjar",
1487       ":base_native_libraries_gen",
1488     ]
1490     deps = [
1491       "//third_party/jsr-305:jsr_305_javalib",
1492     ]
1494     DEPRECATED_java_in_dir = "android/java/src"
1496     # A new version of NativeLibraries.java (with the actual correct values)
1497     # will be created when creating an apk.
1498     jar_excluded_patterns = [
1499       "*/NativeLibraries.class",
1500       "*/NativeLibraries##*.class",
1501     ]
1502   }
1504   # GYP: //base.gyp:base_javatests
1505   android_library("base_javatests") {
1506     deps = [
1507       ":base_java",
1508       ":base_java_test_support",
1509     ]
1510     DEPRECATED_java_in_dir = "android/javatests/src"
1511   }
1513   # GYP: //base.gyp:base_java_test_support
1514   android_library("base_java_test_support") {
1515     deps = [
1516       ":base_java",
1517     ]
1518     DEPRECATED_java_in_dir = "test/android/javatests/src"
1519   }
1521   # GYP: //base.gyp:base_java_application_state
1522   # GYP: //base.gyp:base_java_library_load_from_apk_status_codes
1523   # GYP: //base.gyp:base_java_library_process_type
1524   # GYP: //base.gyp:base_java_memory_pressure_level
1525   java_cpp_enum("base_android_java_enums_srcjar") {
1526     sources = [
1527       "android/application_status_listener.h",
1528       "android/library_loader/library_load_from_apk_status_codes.h",
1529       "android/library_loader/library_loader_hooks.h",
1530       "memory/memory_pressure_listener.h",
1531     ]
1532     outputs = [
1533       "org/chromium/base/ApplicationState.java",
1534       "org/chromium/base/library_loader/LibraryLoadFromApkStatusCodes.java",
1535       "org/chromium/base/library_loader/LibraryProcessType.java",
1536       "org/chromium/base/MemoryPressureLevel.java",
1537     ]
1538   }
1540   # GYP: //base/base.gyp:base_native_libraries_gen
1541   java_cpp_template("base_native_libraries_gen") {
1542     sources = [
1543       "android/java/templates/NativeLibraries.template",
1544     ]
1545     package_name = "org/chromium/base/library_loader"
1546   }
1548   # GYP: //base.gyp:base_java_unittest_support
1549   android_library("base_java_unittest_support") {
1550     deps = [
1551       ":base_java",
1552     ]
1553     java_files =
1554         [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
1555   }