Mask the value of passwords in accessible value.
[chromium-blink-merge.git] / base / BUILD.gn
blob06b17e990b9bc20101c54949a224f0571e436a72
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_onload_delegate.h",
46     "android/jni_registrar.cc",
47     "android/jni_registrar.h",
48     "android/jni_string.cc",
49     "android/jni_string.h",
50     "android/jni_utils.cc",
51     "android/jni_utils.h",
52     "android/jni_weak_ref.cc",
53     "android/jni_weak_ref.h",
54     "android/library_loader/library_load_from_apk_status_codes.h",
55     "android/library_loader/library_loader_hooks.cc",
56     "android/library_loader/library_loader_hooks.h",
57     "android/locale_utils.cc",
58     "android/locale_utils.h",
59     "android/memory_pressure_listener_android.cc",
60     "android/memory_pressure_listener_android.h",
61     "android/path_service_android.cc",
62     "android/path_service_android.h",
63     "android/path_utils.cc",
64     "android/path_utils.h",
65     "android/record_histogram.cc",
66     "android/record_histogram.h",
67     "android/scoped_java_ref.cc",
68     "android/scoped_java_ref.h",
69     "android/sys_utils.cc",
70     "android/sys_utils.h",
71     "android/thread_utils.h",
72     "android/trace_event_binding.cc",
73     "android/trace_event_binding.h",
74     "async_socket_io_handler.h",
75     "async_socket_io_handler_posix.cc",
76     "async_socket_io_handler_win.cc",
77     "at_exit.cc",
78     "at_exit.h",
79     "atomic_ref_count.h",
80     "atomic_sequence_num.h",
81     "atomicops.h",
82     "atomicops_internals_gcc.h",
83     "atomicops_internals_mac.h",
84     "atomicops_internals_portable.h",
85     "atomicops_internals_x86_gcc.cc",
86     "atomicops_internals_x86_gcc.h",
87     "atomicops_internals_x86_msvc.h",
88     "auto_reset.h",
89     "barrier_closure.cc",
90     "barrier_closure.h",
91     "base64.cc",
92     "base64.h",
93     "base_export.h",
94     "base_paths.cc",
95     "base_paths.h",
96     "base_paths_android.cc",
97     "base_paths_android.h",
98     "base_paths_mac.h",
99     "base_paths_mac.mm",
100     "base_paths_posix.cc",
101     "base_paths_posix.h",
102     "base_paths_win.cc",
103     "base_paths_win.h",
104     "base_switches.h",
105     "basictypes.h",
106     "big_endian.cc",
107     "big_endian.h",
108     "bind.h",
109     "bind_helpers.cc",
110     "bind_helpers.h",
111     "bind_internal.h",
112     "bind_internal_win.h",
113     "bits.h",
114     "build_time.cc",
115     "build_time.h",
116     "callback.h",
117     "callback_helpers.cc",
118     "callback_helpers.h",
119     "callback_internal.cc",
120     "callback_internal.h",
121     "cancelable_callback.h",
122     "chromeos/memory_pressure_observer_chromeos.cc",
123     "chromeos/memory_pressure_observer_chromeos.h",
124     "command_line.cc",
125     "command_line.h",
126     "compiler_specific.h",
127     "containers/adapters.h",
128     "containers/hash_tables.h",
129     "containers/linked_list.h",
130     "containers/mru_cache.h",
131     "containers/small_map.h",
132     "containers/stack_container.h",
133     "cpu.cc",
134     "cpu.h",
135     "critical_closure.h",
136     "critical_closure_internal_ios.mm",
137     "debug/alias.cc",
138     "debug/alias.h",
139     "debug/asan_invalid_access.cc",
140     "debug/asan_invalid_access.h",
141     "debug/crash_logging.cc",
142     "debug/crash_logging.h",
143     "debug/debugger.cc",
144     "debug/debugger.h",
145     "debug/debugger_posix.cc",
146     "debug/debugger_win.cc",
147     "debug/dump_without_crashing.cc",
148     "debug/dump_without_crashing.h",
149     "debug/gdi_debug_util_win.cc",
150     "debug/gdi_debug_util_win.h",
151     "third_party/dmg_fp/dmg_fp.h",
152     "third_party/dmg_fp/dtoa_wrapper.cc",
153     "third_party/dmg_fp/g_fmt.cc",
154     "third_party/icu/icu_utf.cc",
155     "third_party/icu/icu_utf.h",
156     "third_party/superfasthash/superfasthash.c",
158     # This file depends on files from the "allocator" target,
159     # but this target does not depend on "allocator" (see
160     # allocator.gyp for details).
161     "debug/leak_annotations.h",
162     "debug/leak_tracker.h",
163     "debug/proc_maps_linux.cc",
164     "debug/proc_maps_linux.h",
165     "debug/profiler.cc",
166     "debug/profiler.h",
167     "debug/stack_trace.cc",
168     "debug/stack_trace.h",
169     "debug/stack_trace_android.cc",
170     "debug/stack_trace_posix.cc",
171     "debug/stack_trace_win.cc",
172     "debug/task_annotator.cc",
173     "debug/task_annotator.h",
174     "deferred_sequenced_task_runner.cc",
175     "deferred_sequenced_task_runner.h",
176     "environment.cc",
177     "environment.h",
178     "file_descriptor_posix.h",
179     "file_version_info.h",
180     "file_version_info_mac.h",
181     "file_version_info_mac.mm",
182     "file_version_info_win.cc",
183     "file_version_info_win.h",
184     "files/dir_reader_fallback.h",
185     "files/dir_reader_linux.h",
186     "files/dir_reader_posix.h",
187     "files/file.cc",
188     "files/file_enumerator.cc",
189     "files/file_enumerator.h",
190     "files/file_enumerator_posix.cc",
191     "files/file_enumerator_win.cc",
192     "files/file_path.cc",
193     "files/file_path.h",
194     "files/file_path_constants.cc",
195     "files/file_path_watcher.cc",
196     "files/file_path_watcher.h",
197     "files/file_path_watcher_fsevents.cc",
198     "files/file_path_watcher_fsevents.h",
199     "files/file_path_watcher_kqueue.cc",
200     "files/file_path_watcher_kqueue.h",
201     "files/file_path_watcher_linux.cc",
202     "files/file_path_watcher_mac.cc",
203     "files/file_path_watcher_win.cc",
204     "files/file_posix.cc",
205     "files/file_proxy.cc",
206     "files/file_proxy.h",
207     "files/file_util.cc",
208     "files/file_util.h",
209     "files/file_util_android.cc",
210     "files/file_util_linux.cc",
211     "files/file_util_mac.mm",
212     "files/file_util_posix.cc",
213     "files/file_util_proxy.cc",
214     "files/file_util_proxy.h",
215     "files/file_util_win.cc",
216     "files/file_win.cc",
217     "files/important_file_writer.cc",
218     "files/important_file_writer.h",
219     "files/memory_mapped_file.cc",
220     "files/memory_mapped_file.h",
221     "files/memory_mapped_file_posix.cc",
222     "files/memory_mapped_file_win.cc",
223     "files/scoped_file.cc",
224     "files/scoped_file.h",
225     "files/scoped_temp_dir.cc",
226     "files/scoped_temp_dir.h",
227     "float_util.h",
228     "format_macros.h",
229     "gtest_prod_util.h",
230     "guid.cc",
231     "guid.h",
232     "guid_posix.cc",
233     "guid_win.cc",
234     "hash.cc",
235     "hash.h",
236     "id_map.h",
237     "ios/device_util.h",
238     "ios/device_util.mm",
239     "ios/ios_util.h",
240     "ios/ios_util.mm",
241     "ios/scoped_critical_action.h",
242     "ios/scoped_critical_action.mm",
243     "ios/weak_nsobject.h",
244     "ios/weak_nsobject.mm",
245     "json/json_file_value_serializer.cc",
246     "json/json_file_value_serializer.h",
247     "json/json_parser.cc",
248     "json/json_parser.h",
249     "json/json_reader.cc",
250     "json/json_reader.h",
251     "json/json_string_value_serializer.cc",
252     "json/json_string_value_serializer.h",
253     "json/json_value_converter.cc",
254     "json/json_value_converter.h",
255     "json/json_writer.cc",
256     "json/json_writer.h",
257     "json/string_escape.cc",
258     "json/string_escape.h",
259     "lazy_instance.cc",
260     "lazy_instance.h",
261     "linux_util.cc",
262     "linux_util.h",
263     "location.cc",
264     "location.h",
265     "logging.cc",
266     "logging.h",
267     "logging_win.cc",
268     "logging_win.h",
269     "mac/authorization_util.h",
270     "mac/authorization_util.mm",
271     "mac/bind_objc_block.h",
272     "mac/bundle_locations.h",
273     "mac/bundle_locations.mm",
274     "mac/cocoa_protocols.h",
275     "mac/foundation_util.h",
276     "mac/foundation_util.mm",
277     "mac/launch_services_util.cc",
278     "mac/launch_services_util.h",
279     "mac/launchd.cc",
280     "mac/launchd.h",
281     "mac/libdispatch_task_runner.cc",
282     "mac/libdispatch_task_runner.h",
283     "mac/mac_logging.cc",
284     "mac/mac_logging.h",
285     "mac/mac_util.h",
286     "mac/mac_util.mm",
287     "mac/mach_logging.cc",
288     "mac/mach_logging.h",
289     "mac/objc_property_releaser.h",
290     "mac/objc_property_releaser.mm",
291     "mac/os_crash_dumps.cc",
292     "mac/os_crash_dumps.h",
293     "mac/scoped_aedesc.h",
294     "mac/scoped_authorizationref.h",
295     "mac/scoped_block.h",
296     "mac/scoped_cftyperef.h",
297     "mac/scoped_ioobject.h",
298     "mac/scoped_ioplugininterface.h",
299     "mac/scoped_launch_data.h",
300     "mac/scoped_mach_port.cc",
301     "mac/scoped_mach_port.h",
302     "mac/scoped_mach_vm.cc",
303     "mac/scoped_mach_vm.h",
304     "mac/scoped_nsautorelease_pool.h",
305     "mac/scoped_nsautorelease_pool.mm",
306     "mac/scoped_nsexception_enabler.h",
307     "mac/scoped_nsexception_enabler.mm",
308     "mac/scoped_nsobject.h",
309     "mac/scoped_objc_class_swizzler.h",
310     "mac/scoped_objc_class_swizzler.mm",
311     "mac/scoped_sending_event.h",
312     "mac/scoped_sending_event.mm",
313     "mac/sdk_forward_declarations.h",
314     "macros.h",
315     "md5.cc",
316     "md5.h",
317     "memory/aligned_memory.cc",
318     "memory/aligned_memory.h",
319     "memory/discardable_memory.cc",
320     "memory/discardable_memory.h",
321     "memory/discardable_memory_android.cc",
322     "memory/discardable_memory_emulated.cc",
323     "memory/discardable_memory_emulated.h",
324     "memory/discardable_memory_linux.cc",
325     "memory/discardable_memory_mac.cc",
326     "memory/discardable_memory_manager.cc",
327     "memory/discardable_memory_manager.h",
328     "memory/discardable_memory_shmem.cc",
329     "memory/discardable_memory_shmem.h",
330     "memory/discardable_memory_shmem_allocator.cc",
331     "memory/discardable_memory_shmem_allocator.h",
332     "memory/discardable_memory_win.cc",
333     "memory/discardable_shared_memory.cc",
334     "memory/discardable_shared_memory.h",
335     "memory/linked_ptr.h",
336     "memory/manual_constructor.h",
337     "memory/memory_pressure_listener.cc",
338     "memory/memory_pressure_listener.h",
339     "memory/raw_scoped_refptr_mismatch_checker.h",
340     "memory/ref_counted.cc",
341     "memory/ref_counted.h",
342     "memory/ref_counted_delete_on_message_loop.h",
343     "memory/ref_counted_memory.cc",
344     "memory/ref_counted_memory.h",
345     "memory/scoped_policy.h",
346     "memory/scoped_ptr.h",
347     "memory/scoped_vector.h",
348     "memory/shared_memory.h",
349     "memory/shared_memory_android.cc",
350     "memory/shared_memory_nacl.cc",
351     "memory/shared_memory_posix.cc",
352     "memory/shared_memory_win.cc",
353     "memory/singleton.cc",
354     "memory/singleton.h",
355     "memory/weak_ptr.cc",
356     "memory/weak_ptr.h",
357     "message_loop/incoming_task_queue.cc",
358     "message_loop/incoming_task_queue.h",
359     "message_loop/message_loop.cc",
360     "message_loop/message_loop.h",
361     "message_loop/message_loop_proxy.cc",
362     "message_loop/message_loop_proxy.h",
363     "message_loop/message_loop_proxy_impl.cc",
364     "message_loop/message_loop_proxy_impl.h",
365     "message_loop/message_pump.cc",
366     "message_loop/message_pump.h",
367     "message_loop/message_pump_android.cc",
368     "message_loop/message_pump_android.h",
369     "message_loop/message_pump_default.cc",
370     "message_loop/message_pump_default.h",
371     "message_loop/message_pump_glib.cc",
372     "message_loop/message_pump_glib.h",
373     "message_loop/message_pump_io_ios.cc",
374     "message_loop/message_pump_io_ios.h",
375     "message_loop/message_pump_libevent.cc",
376     "message_loop/message_pump_libevent.h",
377     "message_loop/message_pump_mac.h",
378     "message_loop/message_pump_mac.mm",
379     "message_loop/message_pump_win.cc",
380     "message_loop/message_pump_win.h",
381     "metrics/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/trace_event.h",
675     "trace_event/trace_event_android.cc",
676     "trace_event/trace_event_argument.cc",
677     "trace_event/trace_event_argument.h",
678     "trace_event/trace_event_impl.cc",
679     "trace_event/trace_event_impl.h",
680     "trace_event/trace_event_impl_constants.cc",
681     "trace_event/trace_event_memory.cc",
682     "trace_event/trace_event_memory.h",
683     "trace_event/trace_event_synthetic_delay.cc",
684     "trace_event/trace_event_synthetic_delay.h",
685     "trace_event/trace_event_system_stats_monitor.cc",
686     "trace_event/trace_event_system_stats_monitor.h",
687     "trace_event/trace_event_win.cc",
688     "trace_event/trace_event_win.h",
689     "tracked_objects.cc",
690     "tracked_objects.h",
691     "tracking_info.cc",
692     "tracking_info.h",
693     "tuple.h",
694     "value_conversions.cc",
695     "value_conversions.h",
696     "values.cc",
697     "values.h",
698     "version.cc",
699     "version.h",
700     "vlog.cc",
701     "vlog.h",
702     "win/enum_variant.cc",
703     "win/enum_variant.h",
704     "win/event_trace_consumer.h",
705     "win/event_trace_controller.cc",
706     "win/event_trace_controller.h",
707     "win/event_trace_provider.cc",
708     "win/event_trace_provider.h",
709     "win/i18n.cc",
710     "win/i18n.h",
711     "win/iat_patch_function.cc",
712     "win/iat_patch_function.h",
713     "win/iunknown_impl.cc",
714     "win/iunknown_impl.h",
715     "win/message_window.cc",
716     "win/message_window.h",
717     "win/metro.cc",
718     "win/metro.h",
719     "win/object_watcher.cc",
720     "win/object_watcher.h",
721     "win/registry.cc",
722     "win/registry.h",
723     "win/resource_util.cc",
724     "win/resource_util.h",
725     "win/scoped_bstr.cc",
726     "win/scoped_bstr.h",
727     "win/scoped_co_mem.h",
728     "win/scoped_com_initializer.h",
729     "win/scoped_comptr.h",
730     "win/scoped_gdi_object.h",
731     "win/scoped_handle.cc",
732     "win/scoped_handle.h",
733     "win/scoped_hdc.h",
734     "win/scoped_hglobal.h",
735     "win/scoped_process_information.cc",
736     "win/scoped_process_information.h",
737     "win/scoped_propvariant.h",
738     "win/scoped_select_object.h",
739     "win/scoped_variant.cc",
740     "win/scoped_variant.h",
741     "win/shortcut.cc",
742     "win/shortcut.h",
743     "win/startup_information.cc",
744     "win/startup_information.h",
745     "win/win_util.cc",
746     "win/win_util.h",
747     "win/windows_version.cc",
748     "win/windows_version.h",
749     "win/wrapped_window_proc.cc",
750     "win/wrapped_window_proc.h",
751   ]
753   if (is_nacl) {
754     sources += [ "files/file_path_watcher_stub.cc" ]
755   }
757   sources -= [
758     "process/process_handle_freebsd.cc",
759     "process/process_handle_openbsd.cc",
760     "process/process_iterator_freebsd.cc",
761     "process/process_iterator_openbsd.cc",
762     "process/process_metrics_freebsd.cc",
763     "process/process_metrics_openbsd.cc",
764     "sys_info_freebsd.cc",
765     "sys_info_openbsd.cc",
766   ]
768   defines = [ "BASE_IMPLEMENTATION" ]
770   deps = [
771     ":base_static",
772     "//base/allocator:allocator_extension_thunks",
773     "//base/third_party/dynamic_annotations",
774     "//base/third_party/nspr",
775     "//third_party/modp_b64",
776   ]
778   # Allow more direct string conversions on platforms with native utf8
779   # strings
780   if (is_mac || is_ios || is_chromeos) {
781     defines += [ "SYSTEM_NATIVE_UTF8" ]
782   }
784   if (is_android) {
785     sources += [
786       "memory/discardable_memory_ashmem.cc",
787       "memory/discardable_memory_ashmem.h",
788       "memory/discardable_memory_ashmem_allocator.cc",
789       "memory/discardable_memory_ashmem_allocator.h",
790     ]
791     sources -= [
792       "base_paths_posix.cc",
793       "power_monitor/power_monitor_device_source_posix.cc",
794     ]
796     # Android uses some Linux sources, put those back.
797     set_sources_assignment_filter([])
798     sources += [
799       "debug/proc_maps_linux.cc",
800       "files/file_path_watcher_linux.cc",
801       "posix/unix_domain_socket_linux.cc",
802       "process/internal_linux.cc",
803       "process/memory_linux.cc",
804       "process/process_handle_linux.cc",
805       "process/process_iterator_linux.cc",
806       "process/process_metrics_linux.cc",
807       "sys_info_linux.cc",
808     ]
809     set_sources_assignment_filter(sources_assignment_filter)
811     deps += [
812       ":base_jni_headers",
813       "//third_party/ashmem",
814       "//third_party/android_tools:cpu_features",
815     ]
817     # logging.cc uses the Android logging library.
818     libs = [ "log" ]
820     sources -= [ "debug/stack_trace_posix.cc" ]
821   }
823   if (is_chromeos) {
824     sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ]
825   }
827   if (is_nacl) {
828     # These things would otherwise be built on a Posix build but aren't
829     # supported on NaCl.
830     sources -= [
831       "debug/stack_trace_posix.cc",
832       "files/file_enumerator_posix.cc",
833       "files/file_util_posix.cc",
834       "memory/shared_memory_posix.cc",
835       "message_loop/message_pump_libevent.cc",
836       "metrics/field_trial.cc",
837       "native_library_posix.cc",
838       "process/kill_posix.cc",
839       "process/launch_posix.cc",
840       "process/process_metrics_posix.cc",
841       "process/process_posix.cc",
842       "sync_socket_posix.cc",
843       "sys_info_posix.cc",
844     ]
845   } else {
846     # Remove nacl stuff.
847     sources -= [
848       "memory/shared_memory_nacl.cc",
849       "os_compat_nacl.cc",
850       "os_compat_nacl.h",
851       "rand_util_nacl.cc",
852     ]
853   }
855   # Windows.
856   if (is_win) {
857     sources -= [
858       "message_loop/message_pump_libevent.cc",
859       "strings/string16.cc",
861       # Not using sha1_win.cc because it may have caused a
862       # regression to page cycler moz.
863       "sha1_win.cc",
864     ]
866     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
867     cflags = [ "/wd4267" ]
869     libs = [
870       "cfgmgr32.lib",
871       "netapi32.lib",
872       "powrprof.lib",
873       "setupapi.lib",
874     ]
875     ldflags = [
876       "/DELAYLOAD:cfgmgr32.dll",
877       "/DELAYLOAD:powrprof.dll",
878       "/DELAYLOAD:setupapi.dll",
879     ]
880   } else if (!is_nacl) {
881     # Non-Windows.
882     deps += [ "//third_party/libevent" ]
883   }
885   # Mac.
886   if (is_mac) {
887     sources += [
888       "memory/discardable_memory_mach.cc",
889       "memory/discardable_memory_mach.h",
890     ]
891     sources -= [
892       "base_paths_posix.cc",
893       "native_library_posix.cc",
894       "strings/sys_string_conversions_posix.cc",
895     ]
896   } else {
897     # Non-Mac.
898     sources -= [
899       "files/file_path_watcher_fsevents.cc",
900       "files/file_path_watcher_fsevents.h",
901       "files/file_path_watcher_kqueue.cc",
902       "files/file_path_watcher_kqueue.h",
903     ]
904   }
906   # Linux.
907   if (is_linux) {
908     # TODO(brettw) this will need to be parameterized at some point.
909     linux_configs = []
910     if (use_glib) {
911       linux_configs += [ "//build/config/linux:glib" ]
912     }
914     configs += linux_configs
915     all_dependent_configs = linux_configs
917     defines += [ "USE_SYMBOLIZE" ]
919     # These dependencies are not required on Android, and in the case
920     # of xdg_mime must be excluded due to licensing restrictions.
921     deps += [
922       "//base/third_party/symbolize",
923       "//base/third_party/xdg_mime",
924       "//base/third_party/xdg_user_dirs",
925     ]
926   } else {
927     # Non-Linux.
928     sources -= [
929       "nix/mime_util_xdg.cc",
930       "nix/mime_util_xdg.h",
931       "nix/xdg_util.cc",
932       "nix/xdg_util.h",
933     ]
935     if (!is_android) {
936       sources -= [
937         "linux_util.cc",
938         "linux_util.h",
939       ]
940     }
941   }
943   if (!use_glib) {
944     sources -= [
945       "message_loop/message_pump_glib.cc",
946       "message_loop/message_pump_glib.h",
947     ]
948   }
950   configs += [ "//build/config/compiler:wexit_time_destructors" ]
951   if (is_android && !is_debug) {
952     configs -= [ "//build/config/compiler:optimize" ]
953     configs += [ "//build/config/compiler:optimize_max" ]
954   }
957 # This is the subset of files from base that should not be used with a dynamic
958 # library. Note that this library cannot depend on base because base depends on
959 # base_static.
960 source_set("base_static") {
961   sources = [
962     "base_switches.cc",
963     "base_switches.h",
964     "win/pe_image.cc",
965     "win/pe_image.h",
966   ]
968   if (is_android && !is_debug) {
969     configs -= [ "//build/config/compiler:optimize" ]
970     configs += [ "//build/config/compiler:optimize_max" ]
971   }
974 component("i18n") {
975   output_name = "base_i18n"
976   sources = [
977     "i18n/base_i18n_export.h",
978     "i18n/bidi_line_iterator.cc",
979     "i18n/bidi_line_iterator.h",
980     "i18n/break_iterator.cc",
981     "i18n/break_iterator.h",
982     "i18n/case_conversion.cc",
983     "i18n/case_conversion.h",
984     "i18n/char_iterator.cc",
985     "i18n/char_iterator.h",
986     "i18n/file_util_icu.cc",
987     "i18n/file_util_icu.h",
988     "i18n/i18n_constants.cc",
989     "i18n/i18n_constants.h",
990     "i18n/icu_encoding_detection.cc",
991     "i18n/icu_encoding_detection.h",
992     "i18n/icu_string_conversions.cc",
993     "i18n/icu_string_conversions.h",
994     "i18n/icu_util.cc",
995     "i18n/icu_util.h",
996     "i18n/number_formatting.cc",
997     "i18n/number_formatting.h",
998     "i18n/rtl.cc",
999     "i18n/rtl.h",
1000     "i18n/streaming_utf8_validator.cc",
1001     "i18n/streaming_utf8_validator.h",
1002     "i18n/string_compare.cc",
1003     "i18n/string_compare.h",
1004     "i18n/string_search.cc",
1005     "i18n/string_search.h",
1006     "i18n/time_formatting.cc",
1007     "i18n/time_formatting.h",
1008     "i18n/timezone.cc",
1009     "i18n/timezone.h",
1010     "i18n/utf8_validator_tables.cc",
1011     "i18n/utf8_validator_tables.h",
1012   ]
1013   defines = [ "BASE_I18N_IMPLEMENTATION" ]
1014   configs += [ "//build/config/compiler:wexit_time_destructors" ]
1015   deps = [
1016     ":base",
1017     "//base/third_party/dynamic_annotations",
1018     "//third_party/icu",
1019   ]
1021   if (is_android && !is_debug) {
1022     configs -= [ "//build/config/compiler:optimize" ]
1023     configs += [ "//build/config/compiler:optimize_max" ]
1024   }
1026   if (is_win) {
1027     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1028     cflags = [ "/wd4267" ]
1029   }
1032 source_set("prefs") {
1033   sources = [
1034     "prefs/base_prefs_export.h",
1035     "prefs/default_pref_store.cc",
1036     "prefs/default_pref_store.h",
1037     "prefs/json_pref_store.cc",
1038     "prefs/json_pref_store.h",
1039     "prefs/overlay_user_pref_store.cc",
1040     "prefs/overlay_user_pref_store.h",
1041     "prefs/persistent_pref_store.h",
1042     "prefs/pref_change_registrar.cc",
1043     "prefs/pref_change_registrar.h",
1044     "prefs/pref_filter.h",
1045     "prefs/pref_member.cc",
1046     "prefs/pref_member.h",
1047     "prefs/pref_notifier.h",
1048     "prefs/pref_notifier_impl.cc",
1049     "prefs/pref_notifier_impl.h",
1050     "prefs/pref_observer.h",
1051     "prefs/pref_registry.cc",
1052     "prefs/pref_registry.h",
1053     "prefs/pref_registry_simple.cc",
1054     "prefs/pref_registry_simple.h",
1055     "prefs/pref_service.cc",
1056     "prefs/pref_service.h",
1057     "prefs/pref_service_factory.cc",
1058     "prefs/pref_service_factory.h",
1059     "prefs/pref_store.cc",
1060     "prefs/pref_store.h",
1061     "prefs/pref_value_map.cc",
1062     "prefs/pref_value_map.h",
1063     "prefs/pref_value_store.cc",
1064     "prefs/pref_value_store.h",
1065     "prefs/scoped_user_pref_update.cc",
1066     "prefs/scoped_user_pref_update.h",
1067     "prefs/value_map_pref_store.cc",
1068     "prefs/value_map_pref_store.h",
1069     "prefs/writeable_pref_store.h",
1070   ]
1072   defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1074   deps = [
1075     ":base",
1076   ]
1078   if (is_android && !is_debug) {
1079     configs -= [ "//build/config/compiler:optimize" ]
1080     configs += [ "//build/config/compiler:optimize_max" ]
1081   }
1084 source_set("prefs_test_support") {
1085   testonly = true
1086   sources = [
1087     "prefs/mock_pref_change_callback.cc",
1088     "prefs/mock_pref_change_callback.h",
1089     "prefs/pref_store_observer_mock.cc",
1090     "prefs/pref_store_observer_mock.h",
1091     "prefs/testing_pref_service.cc",
1092     "prefs/testing_pref_service.h",
1093     "prefs/testing_pref_store.cc",
1094     "prefs/testing_pref_store.h",
1095   ]
1097   public_deps = [
1098     ":prefs",
1099   ]
1100   deps = [
1101     ":base",
1102     "//testing/gmock",
1103     "//testing/gtest",
1104   ]
1107 source_set("message_loop_tests") {
1108   testonly = true
1109   sources = [
1110     "message_loop/message_loop_test.cc",
1111     "message_loop/message_loop_test.h",
1112   ]
1114   deps = [
1115     ":base",
1116     "//testing/gtest",
1117   ]
1120 # TODO(pasko): Remove this target when crbug.com/424562 is fixed.
1121 source_set("protect_file_posix") {
1122   sources = [
1123     "files/protect_file_posix.cc",
1124   ]
1127 test("base_unittests") {
1128   sources = [
1129     "android/application_status_listener_unittest.cc",
1130     "android/content_uri_utils_unittest.cc",
1131     "android/jni_android_unittest.cc",
1132     "android/jni_array_unittest.cc",
1133     "android/jni_string_unittest.cc",
1134     "android/path_utils_unittest.cc",
1135     "android/scoped_java_ref_unittest.cc",
1136     "android/sys_utils_unittest.cc",
1137     "async_socket_io_handler_unittest.cc",
1138     "at_exit_unittest.cc",
1139     "atomicops_unittest.cc",
1140     "barrier_closure_unittest.cc",
1141     "base64_unittest.cc",
1142     "big_endian_unittest.cc",
1143     "bind_unittest.cc",
1144     "bind_unittest.nc",
1145     "bits_unittest.cc",
1146     "build_time_unittest.cc",
1147     "callback_helpers_unittest.cc",
1148     "callback_list_unittest.cc",
1149     "callback_list_unittest.nc",
1150     "callback_unittest.cc",
1151     "callback_unittest.nc",
1152     "cancelable_callback_unittest.cc",
1153     "chromeos/memory_pressure_observer_chromeos_unittest.cc",
1154     "command_line_unittest.cc",
1155     "containers/adapters_unittest.cc",
1156     "containers/hash_tables_unittest.cc",
1157     "containers/linked_list_unittest.cc",
1158     "containers/mru_cache_unittest.cc",
1159     "containers/small_map_unittest.cc",
1160     "containers/stack_container_unittest.cc",
1161     "cpu_unittest.cc",
1162     "debug/crash_logging_unittest.cc",
1163     "debug/debugger_unittest.cc",
1164     "debug/leak_tracker_unittest.cc",
1165     "debug/proc_maps_linux_unittest.cc",
1166     "debug/stack_trace_unittest.cc",
1167     "debug/task_annotator_unittest.cc",
1168     "deferred_sequenced_task_runner_unittest.cc",
1169     "environment_unittest.cc",
1170     "file_version_info_unittest.cc",
1171     "files/dir_reader_posix_unittest.cc",
1172     "files/file_path_unittest.cc",
1173     "files/file_proxy_unittest.cc",
1174     "files/file_unittest.cc",
1175     "files/file_util_proxy_unittest.cc",
1176     "files/file_util_unittest.cc",
1177     "files/important_file_writer_unittest.cc",
1178     "files/scoped_temp_dir_unittest.cc",
1179     "gmock_unittest.cc",
1180     "guid_unittest.cc",
1181     "hash_unittest.cc",
1182     "i18n/break_iterator_unittest.cc",
1183     "i18n/case_conversion_unittest.cc",
1184     "i18n/char_iterator_unittest.cc",
1185     "i18n/file_util_icu_unittest.cc",
1186     "i18n/icu_string_conversions_unittest.cc",
1187     "i18n/number_formatting_unittest.cc",
1188     "i18n/rtl_unittest.cc",
1189     "i18n/streaming_utf8_validator_unittest.cc",
1190     "i18n/string_search_unittest.cc",
1191     "i18n/time_formatting_unittest.cc",
1192     "i18n/timezone_unittest.cc",
1193     "id_map_unittest.cc",
1194     "ios/device_util_unittest.mm",
1195     "ios/weak_nsobject_unittest.mm",
1196     "json/json_parser_unittest.cc",
1197     "json/json_reader_unittest.cc",
1198     "json/json_value_converter_unittest.cc",
1199     "json/json_value_serializer_unittest.cc",
1200     "json/json_writer_unittest.cc",
1201     "json/string_escape_unittest.cc",
1202     "lazy_instance_unittest.cc",
1203     "logging_unittest.cc",
1204     "mac/bind_objc_block_unittest.mm",
1205     "mac/foundation_util_unittest.mm",
1206     "mac/libdispatch_task_runner_unittest.cc",
1207     "mac/mac_util_unittest.mm",
1208     "mac/objc_property_releaser_unittest.mm",
1209     "mac/scoped_nsobject_unittest.mm",
1210     "mac/scoped_objc_class_swizzler_unittest.mm",
1211     "mac/scoped_sending_event_unittest.mm",
1212     "md5_unittest.cc",
1213     "memory/aligned_memory_unittest.cc",
1214     "memory/discardable_memory_manager_unittest.cc",
1215     "memory/discardable_memory_unittest.cc",
1216     "memory/discardable_shared_memory_unittest.cc",
1217     "memory/linked_ptr_unittest.cc",
1218     "memory/ref_counted_memory_unittest.cc",
1219     "memory/ref_counted_unittest.cc",
1220     "memory/scoped_ptr_unittest.cc",
1221     "memory/scoped_ptr_unittest.nc",
1222     "memory/scoped_vector_unittest.cc",
1223     "memory/shared_memory_unittest.cc",
1224     "memory/singleton_unittest.cc",
1225     "memory/weak_ptr_unittest.cc",
1226     "memory/weak_ptr_unittest.nc",
1227     "message_loop/message_loop_proxy_impl_unittest.cc",
1228     "message_loop/message_loop_proxy_unittest.cc",
1229     "message_loop/message_loop_unittest.cc",
1230     "message_loop/message_pump_glib_unittest.cc",
1231     "message_loop/message_pump_io_ios_unittest.cc",
1232     "metrics/bucket_ranges_unittest.cc",
1233     "metrics/field_trial_unittest.cc",
1234     "metrics/histogram_base_unittest.cc",
1235     "metrics/histogram_delta_serialization_unittest.cc",
1236     "metrics/histogram_snapshot_manager_unittest.cc",
1237     "metrics/histogram_unittest.cc",
1238     "metrics/sample_map_unittest.cc",
1239     "metrics/sample_vector_unittest.cc",
1240     "metrics/sparse_histogram_unittest.cc",
1241     "metrics/statistics_recorder_unittest.cc",
1242     "numerics/safe_numerics_unittest.cc",
1243     "observer_list_unittest.cc",
1244     "os_compat_android_unittest.cc",
1245     "path_service_unittest.cc",
1246     "pickle_unittest.cc",
1247     "posix/file_descriptor_shuffle_unittest.cc",
1248     "posix/unix_domain_socket_linux_unittest.cc",
1249     "power_monitor/power_monitor_unittest.cc",
1250     "prefs/default_pref_store_unittest.cc",
1251     "prefs/json_pref_store_unittest.cc",
1252     "prefs/overlay_user_pref_store_unittest.cc",
1253     "prefs/pref_change_registrar_unittest.cc",
1254     "prefs/pref_member_unittest.cc",
1255     "prefs/pref_notifier_impl_unittest.cc",
1256     "prefs/pref_service_unittest.cc",
1257     "prefs/pref_value_map_unittest.cc",
1258     "prefs/pref_value_store_unittest.cc",
1259     "prefs/scoped_user_pref_update_unittest.cc",
1260     "process/memory_unittest.cc",
1261     "process/memory_unittest_mac.h",
1262     "process/memory_unittest_mac.mm",
1263     "process/process_metrics_unittest.cc",
1264     "process/process_metrics_unittest_ios.cc",
1265     "process/process_unittest.cc",
1266     "process/process_util_unittest.cc",
1267     "process/process_util_unittest_ios.cc",
1268     "profiler/tracked_time_unittest.cc",
1269     "rand_util_unittest.cc",
1270     "scoped_clear_errno_unittest.cc",
1271     "scoped_generic_unittest.cc",
1272     "scoped_native_library_unittest.cc",
1273     "security_unittest.cc",
1274     "sequence_checker_unittest.cc",
1275     "sha1_unittest.cc",
1276     "stl_util_unittest.cc",
1277     "strings/nullable_string16_unittest.cc",
1278     "strings/safe_sprintf_unittest.cc",
1279     "strings/string16_unittest.cc",
1280     "strings/string_number_conversions_unittest.cc",
1281     "strings/string_piece_unittest.cc",
1282     "strings/string_split_unittest.cc",
1283     "strings/string_tokenizer_unittest.cc",
1284     "strings/string_util_unittest.cc",
1285     "strings/stringize_macros_unittest.cc",
1286     "strings/stringprintf_unittest.cc",
1287     "strings/sys_string_conversions_mac_unittest.mm",
1288     "strings/sys_string_conversions_unittest.cc",
1289     "strings/utf_offset_string_conversions_unittest.cc",
1290     "strings/utf_string_conversions_unittest.cc",
1291     "supports_user_data_unittest.cc",
1292     "sync_socket_unittest.cc",
1293     "synchronization/cancellation_flag_unittest.cc",
1294     "synchronization/condition_variable_unittest.cc",
1295     "synchronization/lock_unittest.cc",
1296     "synchronization/waitable_event_unittest.cc",
1297     "synchronization/waitable_event_watcher_unittest.cc",
1298     "sys_info_unittest.cc",
1299     "system_monitor/system_monitor_unittest.cc",
1300     "task/cancelable_task_tracker_unittest.cc",
1301     "task_runner_util_unittest.cc",
1302     "template_util_unittest.cc",
1303     "test/expectations/expectation_unittest.cc",
1304     "test/expectations/parser_unittest.cc",
1305     "test/histogram_tester_unittest.cc",
1306     "test/test_reg_util_win_unittest.cc",
1307     "test/trace_event_analyzer_unittest.cc",
1308     "threading/non_thread_safe_unittest.cc",
1309     "threading/platform_thread_unittest.cc",
1310     "threading/sequenced_worker_pool_unittest.cc",
1311     "threading/simple_thread_unittest.cc",
1312     "threading/thread_checker_unittest.cc",
1313     "threading/thread_collision_warner_unittest.cc",
1314     "threading/thread_id_name_manager_unittest.cc",
1315     "threading/thread_local_storage_unittest.cc",
1316     "threading/thread_local_unittest.cc",
1317     "threading/thread_unittest.cc",
1318     "threading/watchdog_unittest.cc",
1319     "threading/worker_pool_posix_unittest.cc",
1320     "threading/worker_pool_unittest.cc",
1321     "time/pr_time_unittest.cc",
1322     "time/time_unittest.cc",
1323     "time/time_win_unittest.cc",
1324     "timer/hi_res_timer_manager_unittest.cc",
1325     "timer/mock_timer_unittest.cc",
1326     "timer/timer_unittest.cc",
1327     "tools_sanity_unittest.cc",
1328     "trace_event/trace_event_argument_unittest.cc",
1329     "trace_event/trace_event_memory_unittest.cc",
1330     "trace_event/trace_event_synthetic_delay_unittest.cc",
1331     "trace_event/trace_event_system_stats_monitor_unittest.cc",
1332     "trace_event/trace_event_unittest.cc",
1333     "trace_event/trace_event_win_unittest.cc",
1334     "tracked_objects_unittest.cc",
1335     "tuple_unittest.cc",
1336     "values_unittest.cc",
1337     "version_unittest.cc",
1338     "vlog_unittest.cc",
1339     "win/dllmain.cc",
1340     "win/enum_variant_unittest.cc",
1341     "win/event_trace_consumer_unittest.cc",
1342     "win/event_trace_controller_unittest.cc",
1343     "win/event_trace_provider_unittest.cc",
1344     "win/i18n_unittest.cc",
1345     "win/iunknown_impl_unittest.cc",
1346     "win/message_window_unittest.cc",
1347     "win/object_watcher_unittest.cc",
1348     "win/pe_image_unittest.cc",
1349     "win/registry_unittest.cc",
1350     "win/scoped_bstr_unittest.cc",
1351     "win/scoped_comptr_unittest.cc",
1352     "win/scoped_process_information_unittest.cc",
1353     "win/scoped_variant_unittest.cc",
1354     "win/shortcut_unittest.cc",
1355     "win/startup_information_unittest.cc",
1356     "win/win_util_unittest.cc",
1357     "win/wrapped_window_proc_unittest.cc",
1358   ]
1360   deps = [
1361     ":base",
1362     ":i18n",
1363     ":message_loop_tests",
1364     ":prefs",
1365     ":prefs_test_support",
1366     "//base/allocator",
1367     "//base/test:run_all_unittests",
1368     "//base/test:test_support",
1369     "//base/third_party/dynamic_annotations",
1370     "//testing/gmock",
1371     "//testing/gtest",
1372     "//third_party/icu",
1373   ]
1375   if (is_android) {
1376     apk_deps = [
1377       ":base_java",
1378       ":base_java_unittest_support",
1379     ]
1380   }
1382   if (is_ios) {
1383     sources -= [
1384       "process/memory_unittest.cc",
1385       "process/memory_unittest_mac.h",
1386       "process/memory_unittest_mac.mm",
1387       "process/process_unittest.cc",
1388       "process/process_util_unittest.cc",
1389     ]
1391     # Pull in specific Mac files for iOS (which have been filtered out by file
1392     # name rules).
1393     set_sources_assignment_filter([])
1394     sources += [
1395       "mac/bind_objc_block_unittest.mm",
1396       "mac/foundation_util_unittest.mm",
1397       "mac/objc_property_releaser_unittest.mm",
1398       "mac/scoped_nsobject_unittest.mm",
1399       "sys_string_conversions_mac_unittest.mm",
1400     ]
1401     set_sources_assignment_filter(sources_assignment_filter)
1403     # TODO(GYP): dep on copy_test_data_ios action.
1404   }
1406   if (is_linux) {
1407     sources -= [ "file_version_info_unittest.cc" ]
1408     sources += [ "nix/xdg_util_unittest.cc" ]
1409     defines = [ "USE_SYMBOLIZE" ]
1410     if (use_glib) {
1411       configs += [ "//build/config/linux:glib" ]
1412     }
1413   }
1415   if (!is_linux || use_ozone) {
1416     sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1417   }
1419   if (is_posix || is_ios) {
1420     sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1421     deps += [ "//third_party/libevent" ]
1422   }
1424   if (is_android) {
1425     deps += [ "//testing/android:native_test_native_code" ]
1426     set_sources_assignment_filter([])
1427     sources += [ "debug/proc_maps_linux_unittest.cc" ]
1428     set_sources_assignment_filter(sources_assignment_filter)
1429   }
1431   if (is_win) {
1432     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1433     cflags = [ "/wd4267" ]
1434   }
1437 if (is_android) {
1438   # GYP: //base.gyp:base_jni_headers
1439   generate_jni("base_jni_headers") {
1440     sources = [
1441       "android/java/src/org/chromium/base/ApplicationStatus.java",
1442       "android/java/src/org/chromium/base/BuildInfo.java",
1443       "android/java/src/org/chromium/base/CommandLine.java",
1444       "android/java/src/org/chromium/base/ContentUriUtils.java",
1445       "android/java/src/org/chromium/base/CpuFeatures.java",
1446       "android/java/src/org/chromium/base/EventLog.java",
1447       "android/java/src/org/chromium/base/FieldTrialList.java",
1448       "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
1449       "android/java/src/org/chromium/base/JNIUtils.java",
1450       "android/java/src/org/chromium/base/JavaHandlerThread.java",
1451       "android/java/src/org/chromium/base/LocaleUtils.java",
1452       "android/java/src/org/chromium/base/MemoryPressureListener.java",
1453       "android/java/src/org/chromium/base/PathService.java",
1454       "android/java/src/org/chromium/base/PathUtils.java",
1455       "android/java/src/org/chromium/base/PowerMonitor.java",
1456       "android/java/src/org/chromium/base/SysUtils.java",
1457       "android/java/src/org/chromium/base/SystemMessageHandler.java",
1458       "android/java/src/org/chromium/base/ThreadUtils.java",
1459       "android/java/src/org/chromium/base/TraceEvent.java",
1460       "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
1461       "android/java/src/org/chromium/base/metrics/RecordHistogram.java",
1462     ]
1463     jni_package = "base"
1464   }
1466   # GYP: //base.gyp:base_java
1467   android_library("base_java") {
1468     srcjar_deps = [
1469       ":base_android_java_enums_srcjar",
1470       ":base_native_libraries_gen",
1471     ]
1473     deps = [
1474       "//third_party/jsr-305:jsr_305_javalib",
1475     ]
1477     DEPRECATED_java_in_dir = "android/java/src"
1479     # A new version of NativeLibraries.java (with the actual correct values)
1480     # will be created when creating an apk.
1481     jar_excluded_patterns = [
1482       "*/NativeLibraries.class",
1483       "*/NativeLibraries##*.class",
1484     ]
1485   }
1487   # GYP: //base.gyp:base_javatests
1488   android_library("base_javatests") {
1489     deps = [
1490       ":base_java",
1491       ":base_java_test_support",
1492     ]
1493     DEPRECATED_java_in_dir = "android/javatests/src"
1494   }
1496   # GYP: //base.gyp:base_java_test_support
1497   android_library("base_java_test_support") {
1498     deps = [
1499       ":base_java",
1500     ]
1501     DEPRECATED_java_in_dir = "test/android/javatests/src"
1502   }
1504   # GYP: //base.gyp:base_java_application_state
1505   # GYP: //base.gyp:base_java_library_load_from_apk_status_codes
1506   # GYP: //base.gyp:base_java_library_process_type
1507   # GYP: //base.gyp:base_java_memory_pressure_level
1508   java_cpp_enum("base_android_java_enums_srcjar") {
1509     sources = [
1510       "android/application_status_listener.h",
1511       "android/library_loader/library_load_from_apk_status_codes.h",
1512       "android/library_loader/library_loader_hooks.h",
1513       "memory/memory_pressure_listener.h",
1514     ]
1515     outputs = [
1516       "org/chromium/base/ApplicationState.java",
1517       "org/chromium/base/library_loader/LibraryLoadFromApkStatusCodes.java",
1518       "org/chromium/base/library_loader/LibraryProcessType.java",
1519       "org/chromium/base/MemoryPressureLevel.java",
1520     ]
1521   }
1523   # GYP: //base/base.gyp:base_native_libraries_gen
1524   java_cpp_template("base_native_libraries_gen") {
1525     sources = [
1526       "android/java/templates/NativeLibraries.template",
1527     ]
1528     package_name = "org/chromium/base/library_loader"
1529   }
1531   # GYP: //base.gyp:base_java_unittest_support
1532   android_library("base_java_unittest_support") {
1533     deps = [
1534       ":base_java",
1535     ]
1536     java_files =
1537         [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
1538   }