The DisplayVirtualKeyboard function on Windows 8 and beyond should not be displaying...
[chromium-blink-merge.git] / base / BUILD.gn
blob669d739fce72939e3aabac96f5715f857dcdf1fc
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
7 if (is_android) {
8   import("//build/config/android/rules.gni")
11 component("base") {
12   sources = [
13     "third_party/dmg_fp/dmg_fp.h",
14     "third_party/dmg_fp/g_fmt.cc",
15     "third_party/dmg_fp/dtoa_wrapper.cc",
16     "third_party/icu/icu_utf.cc",
17     "third_party/icu/icu_utf.h",
18     "third_party/superfasthash/superfasthash.c",
19     "allocator/allocator_extension.cc",
20     "allocator/allocator_extension.h",
21     "allocator/type_profiler_control.cc",
22     "allocator/type_profiler_control.h",
23     "android/application_status_listener.cc",
24     "android/application_status_listener.h",
25     "android/base_jni_registrar.cc",
26     "android/base_jni_registrar.h",
27     "android/build_info.cc",
28     "android/build_info.h",
29     "android/command_line_android.cc",
30     "android/command_line_android.h",
31     "android/content_uri_utils.cc",
32     "android/content_uri_utils.h",
33     "android/cpu_features.cc",
34     "android/event_log.cc",
35     "android/event_log.h",
36     "android/field_trial_list.cc",
37     "android/field_trial_list.h",
38     "android/fifo_utils.cc",
39     "android/fifo_utils.h",
40     "android/important_file_writer_android.cc",
41     "android/important_file_writer_android.h",
42     "android/locale_utils.cc",
43     "android/locale_utils.h",
44     "android/scoped_java_ref.cc",
45     "android/scoped_java_ref.h",
46     "android/jni_android.cc",
47     "android/jni_android.h",
48     "android/jni_array.cc",
49     "android/jni_array.h",
50     "android/jni_registrar.cc",
51     "android/jni_registrar.h",
52     "android/jni_string.cc",
53     "android/jni_string.h",
54     "android/jni_utils.cc",
55     "android/jni_utils.h",
56     "android/jni_weak_ref.cc",
57     "android/jni_weak_ref.h",
58     "android/library_loader/library_loader_hooks.cc",
59     "android/library_loader/library_loader_hooks.h",
60     "android/memory_pressure_listener_android.cc",
61     "android/memory_pressure_listener_android.h",
62     "android/java_handler_thread.cc",
63     "android/java_handler_thread.h",
64     "android/path_service_android.cc",
65     "android/path_service_android.h",
66     "android/path_utils.cc",
67     "android/path_utils.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     "base_export.h",
91     "base_paths.cc",
92     "base_paths.h",
93     "base_paths_android.cc",
94     "base_paths_android.h",
95     "base_paths_mac.h",
96     "base_paths_mac.mm",
97     "base_paths_posix.cc",
98     "base_paths_posix.h",
99     "base_paths_win.cc",
100     "base_paths_win.h",
101     "base_switches.h",
102     "base64.cc",
103     "base64.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     "command_line.cc",
122     "command_line.h",
123     "compiler_specific.h",
124     "containers/adapters.h",
125     "containers/hash_tables.h",
126     "containers/linked_list.h",
127     "containers/mru_cache.h",
128     "containers/small_map.h",
129     "containers/stack_container.h",
130     "cpu.cc",
131     "cpu.h",
132     "critical_closure.h",
133     "critical_closure_internal_ios.mm",
134     "debug/alias.cc",
135     "debug/alias.h",
136     "debug/asan_invalid_access.cc",
137     "debug/asan_invalid_access.h",
138     "debug/crash_logging.cc",
139     "debug/crash_logging.h",
140     "debug/debugger.cc",
141     "debug/debugger.h",
142     "debug/debugger_posix.cc",
143     "debug/debugger_win.cc",
144     "debug/dump_without_crashing.cc",
145     "debug/dump_without_crashing.h",
146     "debug/gdi_debug_util_win.cc",
147     "debug/gdi_debug_util_win.h",
148     # This file depends on files from the "allocator" target,
149     # but this target does not depend on "allocator" (see
150     # allocator.gyp for details).
151     "debug/leak_annotations.h",
152     "debug/leak_tracker.h",
153     "debug/proc_maps_linux.cc",
154     "debug/proc_maps_linux.h",
155     "debug/profiler.cc",
156     "debug/profiler.h",
157     "debug/stack_trace.cc",
158     "debug/stack_trace.h",
159     "debug/stack_trace_android.cc",
160     "debug/stack_trace_posix.cc",
161     "debug/stack_trace_win.cc",
162     "debug/task_annotator.cc",
163     "debug/task_annotator.h",
164     "debug/trace_event.h",
165     "debug/trace_event_android.cc",
166     "debug/trace_event_argument.cc",
167     "debug/trace_event_argument.h",
168     "debug/trace_event_impl.cc",
169     "debug/trace_event_impl.h",
170     "debug/trace_event_impl_constants.cc",
171     "debug/trace_event_memory.cc",
172     "debug/trace_event_memory.h",
173     "debug/trace_event_synthetic_delay.cc",
174     "debug/trace_event_synthetic_delay.h",
175     "debug/trace_event_system_stats_monitor.cc",
176     "debug/trace_event_system_stats_monitor.h",
177     "debug/trace_event_win.cc",
178     "deferred_sequenced_task_runner.cc",
179     "deferred_sequenced_task_runner.h",
180     "environment.cc",
181     "environment.h",
182     "event_recorder.h",
183     "event_recorder_stubs.cc",
184     "event_recorder_win.cc",
185     "file_descriptor_posix.h",
186     "file_version_info.h",
187     "file_version_info_mac.h",
188     "file_version_info_mac.mm",
189     "file_version_info_win.cc",
190     "file_version_info_win.h",
191     "files/dir_reader_fallback.h",
192     "files/dir_reader_linux.h",
193     "files/dir_reader_posix.h",
194     "files/file.cc",
195     "files/file_posix.cc",
196     "files/file_win.cc",
197     "files/file_enumerator.cc",
198     "files/file_enumerator.h",
199     "files/file_enumerator_posix.cc",
200     "files/file_enumerator_win.cc",
201     "files/file_path.cc",
202     "files/file_path.h",
203     "files/file_path_constants.cc",
204     "files/file_path_watcher.cc",
205     "files/file_path_watcher.h",
206     "files/file_path_watcher_fsevents.cc",
207     "files/file_path_watcher_fsevents.h",
208     "files/file_path_watcher_kqueue.cc",
209     "files/file_path_watcher_kqueue.h",
210     "files/file_path_watcher_linux.cc",
211     "files/file_path_watcher_mac.cc",
212     "files/file_path_watcher_win.cc",
213     "files/file_proxy.cc",
214     "files/file_proxy.h",
215     "files/file_util.cc",
216     "files/file_util.h",
217     "files/file_util_android.cc",
218     "files/file_util_linux.cc",
219     "files/file_util_mac.mm",
220     "files/file_util_posix.cc",
221     "files/file_util_proxy.cc",
222     "files/file_util_proxy.h",
223     "files/file_util_win.cc",
224     "files/important_file_writer.cc",
225     "files/important_file_writer.h",
226     "files/memory_mapped_file.cc",
227     "files/memory_mapped_file.h",
228     "files/memory_mapped_file_posix.cc",
229     "files/memory_mapped_file_win.cc",
230     "files/scoped_file.cc",
231     "files/scoped_file.h",
232     "files/scoped_temp_dir.cc",
233     "files/scoped_temp_dir.h",
234     "float_util.h",
235     "format_macros.h",
236     "gtest_prod_util.h",
237     "guid.cc",
238     "guid.h",
239     "guid_posix.cc",
240     "guid_win.cc",
241     "hash.cc",
242     "hash.h",
243     "id_map.h",
244     "ios/device_util.h",
245     "ios/device_util.mm",
246     "ios/ios_util.h",
247     "ios/ios_util.mm",
248     "ios/scoped_critical_action.h",
249     "ios/scoped_critical_action.mm",
250     "json/json_file_value_serializer.cc",
251     "json/json_file_value_serializer.h",
252     "json/json_parser.cc",
253     "json/json_parser.h",
254     "json/json_reader.cc",
255     "json/json_reader.h",
256     "json/json_string_value_serializer.cc",
257     "json/json_string_value_serializer.h",
258     "json/json_value_converter.h",
259     "json/json_writer.cc",
260     "json/json_writer.h",
261     "json/string_escape.cc",
262     "json/string_escape.h",
263     "lazy_instance.cc",
264     "lazy_instance.h",
265     "linux_util.cc",
266     "linux_util.h",
267     "location.cc",
268     "location.h",
269     "logging.cc",
270     "logging.h",
271     "logging_win.cc",
272     "logging_win.h",
273     "mac/authorization_util.h",
274     "mac/authorization_util.mm",
275     "mac/bind_objc_block.h",
276     "mac/bundle_locations.h",
277     "mac/bundle_locations.mm",
278     "mac/cocoa_protocols.h",
279     "mac/foundation_util.h",
280     "mac/foundation_util.mm",
281     "mac/launch_services_util.cc",
282     "mac/launch_services_util.h",
283     "mac/launchd.cc",
284     "mac/launchd.h",
285     "mac/libdispatch_task_runner.cc",
286     "mac/libdispatch_task_runner.h",
287     "mac/mac_logging.h",
288     "mac/mac_logging.cc",
289     "mac/mac_util.h",
290     "mac/mac_util.mm",
291     "mac/mach_logging.cc",
292     "mac/mach_logging.h",
293     "mac/objc_property_releaser.h",
294     "mac/objc_property_releaser.mm",
295     "mac/os_crash_dumps.cc",
296     "mac/os_crash_dumps.h",
297     "mac/scoped_aedesc.h",
298     "mac/scoped_authorizationref.h",
299     "mac/scoped_block.h",
300     "mac/scoped_cftyperef.h",
301     "mac/scoped_ioobject.h",
302     "mac/scoped_ioplugininterface.h",
303     "mac/scoped_launch_data.h",
304     "mac/scoped_mach_port.cc",
305     "mac/scoped_mach_port.h",
306     "mac/scoped_mach_vm.cc",
307     "mac/scoped_mach_vm.h",
308     "mac/scoped_nsautorelease_pool.h",
309     "mac/scoped_nsautorelease_pool.mm",
310     "mac/scoped_nsexception_enabler.h",
311     "mac/scoped_nsexception_enabler.mm",
312     "mac/scoped_nsobject.h",
313     "mac/scoped_objc_class_swizzler.h",
314     "mac/scoped_objc_class_swizzler.mm",
315     "mac/scoped_sending_event.h",
316     "mac/scoped_sending_event.mm",
317     "mac/sdk_forward_declarations.h",
318     "macros.h",
319     "md5.cc",
320     "md5.h",
321     "memory/aligned_memory.cc",
322     "memory/aligned_memory.h",
323     "memory/discardable_memory.cc",
324     "memory/discardable_memory.h",
325     "memory/discardable_memory_android.cc",
326     "memory/discardable_memory_emulated.cc",
327     "memory/discardable_memory_emulated.h",
328     "memory/discardable_memory_linux.cc",
329     "memory/discardable_memory_mac.cc",
330     "memory/discardable_memory_manager.cc",
331     "memory/discardable_memory_manager.h",
332     "memory/discardable_memory_win.cc",
333     "memory/linked_ptr.h",
334     "memory/manual_constructor.h",
335     "memory/memory_pressure_listener.cc",
336     "memory/memory_pressure_listener.h",
337     "memory/raw_scoped_refptr_mismatch_checker.h",
338     "memory/ref_counted.cc",
339     "memory/ref_counted.h",
340     "memory/ref_counted_delete_on_message_loop.h",
341     "memory/ref_counted_memory.cc",
342     "memory/ref_counted_memory.h",
343     "memory/scoped_open_process.h",
344     "memory/scoped_policy.h",
345     "memory/scoped_ptr.h",
346     "memory/scoped_vector.h",
347     "memory/shared_memory.h",
348     "memory/shared_memory_android.cc",
349     "memory/shared_memory_nacl.cc",
350     "memory/shared_memory_posix.cc",
351     "memory/shared_memory_win.cc",
352     "memory/singleton.cc",
353     "memory/singleton.h",
354     "memory/weak_ptr.cc",
355     "memory/weak_ptr.h",
356     "message_loop/incoming_task_queue.cc",
357     "message_loop/incoming_task_queue.h",
358     "message_loop/message_loop.cc",
359     "message_loop/message_loop.h",
360     "message_loop/message_loop_proxy.cc",
361     "message_loop/message_loop_proxy.h",
362     "message_loop/message_loop_proxy_impl.cc",
363     "message_loop/message_loop_proxy_impl.h",
364     "message_loop/message_pump.cc",
365     "message_loop/message_pump.h",
366     "message_loop/message_pump_android.cc",
367     "message_loop/message_pump_android.h",
368     "message_loop/message_pump_default.cc",
369     "message_loop/message_pump_default.h",
370     "message_loop/message_pump_glib.cc",
371     "message_loop/message_pump_glib.h",
372     "message_loop/message_pump_io_ios.cc",
373     "message_loop/message_pump_io_ios.h",
374     "message_loop/message_pump_libevent.cc",
375     "message_loop/message_pump_libevent.h",
376     "message_loop/message_pump_mac.h",
377     "message_loop/message_pump_mac.mm",
378     "message_loop/message_pump_win.cc",
379     "message_loop/message_pump_win.h",
380     "metrics/field_trial.cc",
381     "metrics/field_trial.h",
382     "metrics/sample_map.cc",
383     "metrics/sample_map.h",
384     "metrics/sample_vector.cc",
385     "metrics/sample_vector.h",
386     "metrics/bucket_ranges.cc",
387     "metrics/bucket_ranges.h",
388     "metrics/histogram.cc",
389     "metrics/histogram.h",
390     "metrics/histogram_base.cc",
391     "metrics/histogram_base.h",
392     "metrics/histogram_delta_serialization.cc",
393     "metrics/histogram_delta_serialization.",
394     "metrics/histogram_flattener.h",
395     "metrics/histogram_samples.cc",
396     "metrics/histogram_samples.h",
397     "metrics/histogram_snapshot_manager.cc",
398     "metrics/histogram_snapshot_manager.h",
399     "metrics/sparse_histogram.cc",
400     "metrics/sparse_histogram.h",
401     "metrics/statistics_recorder.cc",
402     "metrics/statistics_recorder.h",
403     "metrics/stats_counters.cc",
404     "metrics/stats_counters.h",
405     "metrics/stats_table.cc",
406     "metrics/stats_table.h",
407     "metrics/user_metrics.cc",
408     "metrics/user_metrics.h",
409     "metrics/user_metrics_action.h",
410     "move.h",
411     "native_library.h",
412     "native_library_mac.mm",
413     "native_library_posix.cc",
414     "native_library_win.cc",
415     "numerics/safe_conversions.h",
416     "numerics/safe_conversions_impl.h",
417     "numerics/safe_math.h",
418     "numerics/safe_math_impl.h",
419     "nix/mime_util_xdg.cc",
420     "nix/mime_util_xdg.h",
421     "nix/xdg_util.cc",
422     "nix/xdg_util.h",
423     "observer_list.h",
424     "observer_list_threadsafe.h",
425     "os_compat_android.cc",
426     "os_compat_android.h",
427     "os_compat_nacl.cc",
428     "os_compat_nacl.h",
429     "path_service.cc",
430     "path_service.h",
431     "pending_task.cc",
432     "pending_task.h",
433     "pickle.cc",
434     "pickle.h",
435     "port.h",
436     "posix/eintr_wrapper.h",
437     "posix/file_descriptor_shuffle.cc",
438     "posix/global_descriptors.cc",
439     "posix/global_descriptors.h",
440     "posix/unix_domain_socket_linux.cc",
441     "posix/unix_domain_socket_linux.h",
442     "power_monitor/power_monitor.cc",
443     "power_monitor/power_monitor.h",
444     "power_monitor/power_monitor_device_source.cc",
445     "power_monitor/power_monitor_device_source.h",
446     "power_monitor/power_monitor_device_source_android.cc",
447     "power_monitor/power_monitor_device_source_android.h",
448     "power_monitor/power_monitor_device_source_chromeos.cc",
449     "power_monitor/power_monitor_device_source_ios.mm",
450     "power_monitor/power_monitor_device_source_mac.mm",
451     "power_monitor/power_monitor_device_source_posix.cc",
452     "power_monitor/power_monitor_device_source_win.cc",
453     "power_monitor/power_monitor_source.cc",
454     "power_monitor/power_monitor_source.h",
455     "power_monitor/power_observer.h",
456     "process/internal_linux.cc",
457     "process/internal_linux.h",
458     "process/kill.cc",
459     "process/kill.h",
460     "process/kill_mac.cc",
461     "process/kill_posix.cc",
462     "process/kill_win.cc",
463     "process/launch.cc",
464     "process/launch.h",
465     "process/launch_ios.cc",
466     "process/launch_mac.cc",
467     "process/launch_posix.cc",
468     "process/launch_win.cc",
469     "process/memory.cc",
470     "process/memory.h",
471     "process/memory_linux.cc",
472     "process/memory_mac.mm",
473     "process/memory_win.cc",
474     "process/process.h",
475     "process/process_handle_freebsd.cc",
476     "process/process_handle_linux.cc",
477     "process/process_handle_mac.cc",
478     "process/process_handle_openbsd.cc",
479     "process/process_handle_posix.cc",
480     "process/process_handle_win.cc",
481     "process/process_info.h",
482     "process/process_info_linux.cc",
483     "process/process_info_mac.cc",
484     "process/process_info_win.cc",
485     "process/process_iterator.cc",
486     "process/process_iterator.h",
487     "process/process_iterator_freebsd.cc",
488     "process/process_iterator_linux.cc",
489     "process/process_iterator_mac.cc",
490     "process/process_iterator_openbsd.cc",
491     "process/process_iterator_win.cc",
492     "process/process_linux.cc",
493     "process/process_metrics.cc",
494     "process/process_metrics.h",
495     "process/process_metrics_freebsd.cc",
496     "process/process_metrics_ios.cc",
497     "process/process_metrics_linux.cc",
498     "process/process_metrics_mac.cc",
499     "process/process_metrics_openbsd.cc",
500     "process/process_metrics_posix.cc",
501     "process/process_metrics_win.cc",
502     "process/process_posix.cc",
503     "process/process_win.cc",
504     "profiler/scoped_profile.cc",
505     "profiler/scoped_profile.h",
506     "profiler/alternate_timer.cc",
507     "profiler/alternate_timer.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_split.cc",
544     "strings/string_split.h",
545     "strings/string_number_conversions.h",
546     "strings/string_piece.cc",
547     "strings/string_piece.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     "system_monitor/system_monitor.cc",
590     "system_monitor/system_monitor.h",
591     "sys_byteorder.h",
592     "sys_info.cc",
593     "sys_info.h",
594     "sys_info_android.cc",
595     "sys_info_chromeos.cc",
596     "sys_info_freebsd.cc",
597     "sys_info_ios.mm",
598     "sys_info_linux.cc",
599     "sys_info_mac.cc",
600     "sys_info_openbsd.cc",
601     "sys_info_posix.cc",
602     "sys_info_win.cc",
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.h",
644     "threading/thread_restrictions.cc",
645     "threading/watchdog.cc",
646     "threading/watchdog.h",
647     "threading/worker_pool.h",
648     "threading/worker_pool.cc",
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     "tracked_objects.cc",
675     "tracked_objects.h",
676     "tracking_info.cc",
677     "tracking_info.h",
678     "tuple.h",
679     "values.cc",
680     "values.h",
681     "value_conversions.cc",
682     "value_conversions.h",
683     "version.cc",
684     "version.h",
685     "vlog.cc",
686     "vlog.h",
687     "win/enum_variant.cc",
688     "win/enum_variant.h",
689     "win/event_trace_consumer.h",
690     "win/event_trace_controller.cc",
691     "win/event_trace_controller.h",
692     "win/event_trace_provider.cc",
693     "win/event_trace_provider.h",
694     "win/i18n.cc",
695     "win/i18n.h",
696     "win/iat_patch_function.cc",
697     "win/iat_patch_function.h",
698     "win/iunknown_impl.cc",
699     "win/iunknown_impl.h",
700     "win/message_window.cc",
701     "win/message_window.h",
702     "win/metro.cc",
703     "win/metro.h",
704     "win/object_watcher.cc",
705     "win/object_watcher.h",
706     "win/registry.cc",
707     "win/registry.h",
708     "win/resource_util.cc",
709     "win/resource_util.h",
710     "win/scoped_bstr.cc",
711     "win/scoped_bstr.h",
712     "win/scoped_co_mem.h",
713     "win/scoped_com_initializer.h",
714     "win/scoped_comptr.h",
715     "win/scoped_gdi_object.h",
716     "win/scoped_handle.cc",
717     "win/scoped_handle.h",
718     "win/scoped_hdc.h",
719     "win/scoped_hglobal.h",
720     "win/scoped_process_information.cc",
721     "win/scoped_process_information.h",
722     "win/scoped_propvariant.h",
723     "win/scoped_select_object.h",
724     "win/scoped_variant.cc",
725     "win/scoped_variant.h",
726     "win/shortcut.cc",
727     "win/shortcut.h",
728     "win/startup_information.cc",
729     "win/startup_information.h",
730     "win/win_util.cc",
731     "win/win_util.h",
732     "win/windows_version.cc",
733     "win/windows_version.h",
734     "win/wrapped_window_proc.cc",
735     "win/wrapped_window_proc.h",
736   ]
738   if (is_nacl) {
739     sources += [ "files/file_path_watcher_stub.cc" ]
740   }
742   sources -= [
743     "process/process_handle_freebsd.cc",
744     "process/process_handle_openbsd.cc",
745     "process/process_iterator_freebsd.cc",
746     "process/process_iterator_openbsd.cc",
747     "process/process_metrics_freebsd.cc",
748     "process/process_metrics_openbsd.cc",
749     "sys_info_freebsd.cc",
750     "sys_info_openbsd.cc",
751   ]
753   defines = [
754     "BASE_IMPLEMENTATION",
755   ]
757   deps = [
758     ":base_static",
759     "//base/allocator:allocator_extension_thunks",
760     "//base/third_party/dynamic_annotations",
761     "//base/third_party/nspr",
762     "//third_party/modp_b64",
763   ]
765   if (is_android) {
766     sources += [
767        "memory/discardable_memory_ashmem_allocator.cc",
768        "memory/discardable_memory_ashmem_allocator.h",
769        "memory/discardable_memory_ashmem.cc",
770        "memory/discardable_memory_ashmem.h",
771     ]
772     sources -= [
773       "base_paths_posix.cc",
774       "power_monitor/power_monitor_device_source_posix.cc",
775     ]
777     # Android uses some Linux sources, put those back.
778     set_sources_assignment_filter([])
779     sources += [
780       "debug/proc_maps_linux.cc",
781       "files/file_path_watcher_linux.cc",
782       "process/memory_linux.cc",
783       "process/internal_linux.cc",
784       "process/process_handle_linux.cc",
785       "process/process_iterator_linux.cc",
786       "process/process_metrics_linux.cc",
787       "posix/unix_domain_socket_linux.cc",
788       "sys_info_linux.cc",
789     ]
790     set_sources_assignment_filter(sources_assignment_filter)
792     deps += [
793       ":base_jni_headers",
794       "//third_party/ashmem",
795       "//third_party/android_tools:cpu_features"
796     ]
798     # logging.cc uses the Android logging library.
799     libs = [ "log" ]
801     sources -= [
802       "debug/stack_trace_posix.cc",
803     ]
804   }
806   if (is_chromeos) {
807     sources -= [
808       "power_monitor/power_monitor_device_source_posix.cc",
809     ]
810   }
812   if (is_nacl) {
813     # These things would otherwise be built on a Posix build but aren't
814     # supported on NaCl.
815     sources -= [
816       "debug/stack_trace_posix.cc",
817       "files/file_enumerator_posix.cc",
818       "files/file_util_posix.cc",
819       "message_loop/message_pump_libevent.cc",
820       "process/kill_posix.cc",
821       "process/launch_posix.cc",
822       "process/process_metrics_posix.cc",
823       "process/process_posix.cc",
824       "metrics/field_trial.cc",
825       "native_library_posix.cc",
826       "memory/shared_memory_posix.cc",
827       "sync_socket_posix.cc",
828       "sys_info_posix.cc",
829     ]
830   } else {
831     # Remove nacl stuff.
832     sources -= [
833       "os_compat_nacl.cc",
834       "os_compat_nacl.h",
835       "rand_util_nacl.cc",
836       "memory/shared_memory_nacl.cc",
837     ]
838   }
840   # Windows.
841   if (is_win) {
842     sources -= [
843       "event_recorder_stubs.cc",
844       "message_loop/message_pump_libevent.cc",
845       "strings/string16.cc",
846       # Not using sha1_win.cc because it may have caused a
847       # regression to page cycler moz.
848       "sha1_win.cc",
849     ]
851     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
852     #cflags = [ "/wd4267" ]
854     libs = [
855       "cfgmgr32.lib",
856       "netapi32.lib",
857       "powrprof.lib",
858       "setupapi.lib",
859     ]
860     ldflags = [
861       "/DELAYLOAD:cfgmgr32.dll",
862       "/DELAYLOAD:powrprof.dll",
863       "/DELAYLOAD:setupapi.dll",
864     ]
865   } else if (!is_nacl) {
866     # Non-Windows.
867     deps += [ "//third_party/libevent" ]
868   }
870   # Mac.
871   if (is_mac) {
872     sources += [
873        "memory/discardable_memory_mach.cc",
874        "memory/discardable_memory_mach.h",
875     ]
876     sources -= [
877       "base_paths_posix.cc",
878       "native_library_posix.cc",
879       "strings/sys_string_conversions_posix.cc",
880     ]
881     deps += [ "//third_party/mach_override" ]
882   } else {
883     # Non-Mac.
884     sources -= [
885       "files/file_path_watcher_fsevents.cc",
886       "files/file_path_watcher_fsevents.h",
887       "files/file_path_watcher_kqueue.cc",
888       "files/file_path_watcher_kqueue.h",
889     ]
890   }
892   # Linux.
893   if (is_linux) {
894     # TODO(brettw) this will need to be parameterized at some point.
895     linux_configs = [
896       "//build/config/linux:glib",
897     ]
899     configs += linux_configs
900     all_dependent_configs = linux_configs
902     defines += [ "USE_SYMBOLIZE" ]
904     # These dependencies are not required on Android, and in the case
905     # of xdg_mime must be excluded due to licensing restrictions.
906     deps += [
907       "//base/third_party/symbolize",
908       "//base/third_party/xdg_mime",
909       "//base/third_party/xdg_user_dirs",
910     ]
911   } else {
912     # Non-Linux.
913     sources -= [
914       "nix/mime_util_xdg.cc",
915       "nix/mime_util_xdg.h",
916       "nix/xdg_util.cc",
917       "nix/xdg_util.h",
918     ]
920     if (!is_android) {
921       sources -= [
922         "linux_util.cc",
923         "linux_util.h",
924       ]
925     }
926   }
928   if (!use_glib) {
929     sources -= [
930       "message_loop/message_pump_glib.cc",
931       "message_loop/message_pump_glib.h",
932     ]
933   }
935   configs += [ "//build/config/compiler:wexit_time_destructors" ]
936   if (is_android && !is_debug) {
937     configs -= [ "//build/config/compiler:optimize" ]
938     configs += [ "//build/config/compiler:optimize_max" ]
939   }
942 # This is the subset of files from base that should not be used with a dynamic
943 # library. Note that this library cannot depend on base because base depends on
944 # base_static.
945 source_set("base_static") {
946   sources = [
947     "base_switches.cc",
948     "base_switches.h",
949     "win/pe_image.cc",
950     "win/pe_image.h",
951   ]
953   if (is_android && !is_debug) {
954     configs -= [ "//build/config/compiler:optimize" ]
955     configs += [ "//build/config/compiler:optimize_max" ]
956   }
959 component("i18n") {
960   output_name = "base_i18n"
961   sources = [
962     "i18n/base_i18n_export.h",
963     "i18n/bidi_line_iterator.cc",
964     "i18n/bidi_line_iterator.h",
965     "i18n/break_iterator.cc",
966     "i18n/break_iterator.h",
967     "i18n/case_conversion.cc",
968     "i18n/case_conversion.h",
969     "i18n/char_iterator.cc",
970     "i18n/char_iterator.h",
971     "i18n/file_util_icu.cc",
972     "i18n/file_util_icu.h",
973     "i18n/i18n_constants.cc",
974     "i18n/i18n_constants.h",
975     "i18n/icu_encoding_detection.cc",
976     "i18n/icu_encoding_detection.h",
977     "i18n/icu_string_conversions.cc",
978     "i18n/icu_string_conversions.h",
979     "i18n/icu_util.cc",
980     "i18n/icu_util.h",
981     "i18n/number_formatting.cc",
982     "i18n/number_formatting.h",
983     "i18n/rtl.cc",
984     "i18n/rtl.h",
985     "i18n/streaming_utf8_validator.cc",
986     "i18n/streaming_utf8_validator.h",
987     "i18n/string_compare.cc",
988     "i18n/string_compare.h",
989     "i18n/string_search.cc",
990     "i18n/string_search.h",
991     "i18n/time_formatting.cc",
992     "i18n/time_formatting.h",
993     "i18n/timezone.cc",
994     "i18n/timezone.h",
995     "i18n/utf8_validator_tables.cc",
996     "i18n/utf8_validator_tables.h",
997   ]
998   defines = [ "BASE_I18N_IMPLEMENTATION" ]
999   configs += [ "//build/config/compiler:wexit_time_destructors" ]
1000   deps = [
1001     ":base",
1002     "//base/third_party/dynamic_annotations",
1003     "//third_party/icu",
1004   ]
1006   if (is_android && !is_debug) {
1007     configs -= [ "//build/config/compiler:optimize" ]
1008     configs += [ "//build/config/compiler:optimize_max" ]
1009   }
1012 source_set("prefs") {
1013   sources = [
1014     "prefs/base_prefs_export.h",
1015     "prefs/default_pref_store.cc",
1016     "prefs/default_pref_store.h",
1017     "prefs/json_pref_store.cc",
1018     "prefs/json_pref_store.h",
1019     "prefs/overlay_user_pref_store.cc",
1020     "prefs/overlay_user_pref_store.h",
1021     "prefs/persistent_pref_store.h",
1022     "prefs/pref_change_registrar.cc",
1023     "prefs/pref_change_registrar.h",
1024     "prefs/pref_filter.h",
1025     "prefs/pref_member.cc",
1026     "prefs/pref_member.h",
1027     "prefs/pref_notifier.h",
1028     "prefs/pref_notifier_impl.cc",
1029     "prefs/pref_notifier_impl.h",
1030     "prefs/pref_observer.h",
1031     "prefs/pref_registry.cc",
1032     "prefs/pref_registry.h",
1033     "prefs/pref_registry_simple.cc",
1034     "prefs/pref_registry_simple.h",
1035     "prefs/pref_service.cc",
1036     "prefs/pref_service.h",
1037     "prefs/pref_service_factory.cc",
1038     "prefs/pref_service_factory.h",
1039     "prefs/pref_store.cc",
1040     "prefs/pref_store.h",
1041     "prefs/pref_value_map.cc",
1042     "prefs/pref_value_map.h",
1043     "prefs/pref_value_store.cc",
1044     "prefs/pref_value_store.h",
1045     "prefs/scoped_user_pref_update.cc",
1046     "prefs/scoped_user_pref_update.h",
1047     "prefs/value_map_pref_store.cc",
1048     "prefs/value_map_pref_store.h",
1049     "prefs/writeable_pref_store.h",
1050   ]
1052   defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1054   deps = [ ":base" ]
1056   if (is_android && !is_debug) {
1057     configs -= [ "//build/config/compiler:optimize" ]
1058     configs += [ "//build/config/compiler:optimize_max" ]
1059   }
1062 source_set("prefs_test_support") {
1063   testonly = true
1064   sources = [
1065     "prefs/mock_pref_change_callback.cc",
1066     "prefs/mock_pref_change_callback.h",
1067     "prefs/pref_store_observer_mock.cc",
1068     "prefs/pref_store_observer_mock.h",
1069     "prefs/testing_pref_service.cc",
1070     "prefs/testing_pref_service.h",
1071     "prefs/testing_pref_store.cc",
1072     "prefs/testing_pref_store.h",
1073   ]
1075   deps = [
1076     ":base",
1077     ":prefs",
1078     "//testing/gmock",
1079     "//testing/gtest",
1080   ]
1083 source_set("message_loop_tests") {
1084   testonly = true
1085   sources = [
1086     "message_loop/message_loop_test.cc",
1087     "message_loop/message_loop_test.h",
1088   ]
1090   deps = [
1091     ":base",
1092     "//testing/gtest",
1093   ]
1096 test("base_unittests") {
1097   sources = [
1098     "android/application_status_listener_unittest.cc",
1099     "android/jni_android_unittest.cc",
1100     "android/jni_array_unittest.cc",
1101     "android/jni_string_unittest.cc",
1102     "android/path_utils_unittest.cc",
1103     "android/scoped_java_ref_unittest.cc",
1104     "android/sys_utils_unittest.cc",
1105     "async_socket_io_handler_unittest.cc",
1106     "at_exit_unittest.cc",
1107     "atomicops_unittest.cc",
1108     "barrier_closure_unittest.cc",
1109     "base64_unittest.cc",
1110     "big_endian_unittest.cc",
1111     "bind_unittest.cc",
1112     "bind_unittest.nc",
1113     "bits_unittest.cc",
1114     "build_time_unittest.cc",
1115     "callback_helpers_unittest.cc",
1116     "callback_list_unittest.cc",
1117     "callback_list_unittest.nc",
1118     "callback_unittest.cc",
1119     "callback_unittest.nc",
1120     "cancelable_callback_unittest.cc",
1121     "command_line_unittest.cc",
1122     "containers/adapters_unittest.cc",
1123     "containers/hash_tables_unittest.cc",
1124     "containers/linked_list_unittest.cc",
1125     "containers/mru_cache_unittest.cc",
1126     "containers/small_map_unittest.cc",
1127     "containers/stack_container_unittest.cc",
1128     "cpu_unittest.cc",
1129     "debug/crash_logging_unittest.cc",
1130     "debug/leak_tracker_unittest.cc",
1131     "debug/proc_maps_linux_unittest.cc",
1132     "debug/stack_trace_unittest.cc",
1133     "debug/task_annotator_unittest.cc",
1134     "debug/trace_event_argument_unittest.cc",
1135     "debug/trace_event_memory_unittest.cc",
1136     "debug/trace_event_synthetic_delay_unittest.cc",
1137     "debug/trace_event_system_stats_monitor_unittest.cc",
1138     "debug/trace_event_unittest.cc",
1139     "debug/trace_event_unittest.h",
1140     "debug/trace_event_win_unittest.cc",
1141     "deferred_sequenced_task_runner_unittest.cc",
1142     "environment_unittest.cc",
1143     "file_version_info_unittest.cc",
1144     "files/dir_reader_posix_unittest.cc",
1145     "files/file_path_unittest.cc",
1146     "files/file_proxy_unittest.cc",
1147     "files/file_unittest.cc",
1148     "files/file_util_proxy_unittest.cc",
1149     "files/file_util_unittest.cc",
1150     "files/important_file_writer_unittest.cc",
1151     "files/scoped_temp_dir_unittest.cc",
1152     "gmock_unittest.cc",
1153     "guid_unittest.cc",
1154     "hash_unittest.cc",
1155     "id_map_unittest.cc",
1156     "i18n/break_iterator_unittest.cc",
1157     "i18n/char_iterator_unittest.cc",
1158     "i18n/case_conversion_unittest.cc",
1159     "i18n/file_util_icu_unittest.cc",
1160     "i18n/icu_string_conversions_unittest.cc",
1161     "i18n/number_formatting_unittest.cc",
1162     "i18n/rtl_unittest.cc",
1163     "i18n/streaming_utf8_validator_unittest.cc",
1164     "i18n/string_search_unittest.cc",
1165     "i18n/time_formatting_unittest.cc",
1166     "i18n/timezone_unittest.cc",
1167     "ios/device_util_unittest.mm",
1168     "json/json_parser_unittest.cc",
1169     "json/json_reader_unittest.cc",
1170     "json/json_value_converter_unittest.cc",
1171     "json/json_value_serializer_unittest.cc",
1172     "json/json_writer_unittest.cc",
1173     "json/string_escape_unittest.cc",
1174     "lazy_instance_unittest.cc",
1175     "logging_unittest.cc",
1176     "mac/bind_objc_block_unittest.mm",
1177     "mac/foundation_util_unittest.mm",
1178     "mac/libdispatch_task_runner_unittest.cc",
1179     "mac/mac_util_unittest.mm",
1180     "mac/objc_property_releaser_unittest.mm",
1181     "mac/scoped_nsobject_unittest.mm",
1182     "mac/scoped_objc_class_swizzler_unittest.mm",
1183     "mac/scoped_sending_event_unittest.mm",
1184     "md5_unittest.cc",
1185     "memory/aligned_memory_unittest.cc",
1186     "memory/discardable_memory_manager_unittest.cc",
1187     "memory/discardable_memory_unittest.cc",
1188     "memory/linked_ptr_unittest.cc",
1189     "memory/ref_counted_memory_unittest.cc",
1190     "memory/ref_counted_unittest.cc",
1191     "memory/scoped_ptr_unittest.cc",
1192     "memory/scoped_ptr_unittest.nc",
1193     "memory/scoped_vector_unittest.cc",
1194     "memory/shared_memory_unittest.cc",
1195     "memory/singleton_unittest.cc",
1196     "memory/weak_ptr_unittest.cc",
1197     "memory/weak_ptr_unittest.nc",
1198     "message_loop/message_loop_proxy_impl_unittest.cc",
1199     "message_loop/message_loop_proxy_unittest.cc",
1200     "message_loop/message_loop_unittest.cc",
1201     "message_loop/message_pump_glib_unittest.cc",
1202     "message_loop/message_pump_io_ios_unittest.cc",
1203     "metrics/sample_map_unittest.cc",
1204     "metrics/sample_vector_unittest.cc",
1205     "metrics/bucket_ranges_unittest.cc",
1206     "metrics/field_trial_unittest.cc",
1207     "metrics/histogram_base_unittest.cc",
1208     "metrics/histogram_delta_serialization_unittest.cc",
1209     "metrics/histogram_snapshot_manager_unittest.cc",
1210     "metrics/histogram_unittest.cc",
1211     "metrics/sparse_histogram_unittest.cc",
1212     "metrics/stats_table_unittest.cc",
1213     "metrics/statistics_recorder_unittest.cc",
1214     "observer_list_unittest.cc",
1215     "os_compat_android_unittest.cc",
1216     "path_service_unittest.cc",
1217     "pickle_unittest.cc",
1218     "posix/file_descriptor_shuffle_unittest.cc",
1219     "posix/unix_domain_socket_linux_unittest.cc",
1220     "power_monitor/power_monitor_unittest.cc",
1221     "prefs/default_pref_store_unittest.cc",
1222     "prefs/json_pref_store_unittest.cc",
1223     "prefs/overlay_user_pref_store_unittest.cc",
1224     "prefs/pref_change_registrar_unittest.cc",
1225     "prefs/pref_member_unittest.cc",
1226     "prefs/pref_notifier_impl_unittest.cc",
1227     "prefs/pref_service_unittest.cc",
1228     "prefs/pref_value_map_unittest.cc",
1229     "prefs/pref_value_store_unittest.cc",
1230     "prefs/scoped_user_pref_update_unittest.cc",
1231     "process/memory_unittest.cc",
1232     "process/memory_unittest_mac.h",
1233     "process/memory_unittest_mac.mm",
1234     "process/process_metrics_unittest.cc",
1235     "process/process_metrics_unittest_ios.cc",
1236     "process/process_unittest.cc",
1237     "process/process_util_unittest.cc",
1238     "process/process_util_unittest_ios.cc",
1239     "profiler/tracked_time_unittest.cc",
1240     "rand_util_unittest.cc",
1241     "numerics/safe_numerics_unittest.cc",
1242     "scoped_clear_errno_unittest.cc",
1243     "scoped_generic_unittest.cc",
1244     "scoped_native_library_unittest.cc",
1245     "security_unittest.cc",
1246     "sequence_checker_unittest.cc",
1247     "sha1_unittest.cc",
1248     "stl_util_unittest.cc",
1249     "strings/nullable_string16_unittest.cc",
1250     "strings/safe_sprintf_unittest.cc",
1251     "strings/string16_unittest.cc",
1252     "strings/stringprintf_unittest.cc",
1253     "strings/string_number_conversions_unittest.cc",
1254     "strings/string_piece_unittest.cc",
1255     "strings/string_split_unittest.cc",
1256     "strings/string_tokenizer_unittest.cc",
1257     "strings/string_util_unittest.cc",
1258     "strings/stringize_macros_unittest.cc",
1259     "strings/sys_string_conversions_mac_unittest.mm",
1260     "strings/sys_string_conversions_unittest.cc",
1261     "strings/utf_offset_string_conversions_unittest.cc",
1262     "strings/utf_string_conversions_unittest.cc",
1263     "supports_user_data_unittest.cc",
1264     "sync_socket_unittest.cc",
1265     "synchronization/cancellation_flag_unittest.cc",
1266     "synchronization/condition_variable_unittest.cc",
1267     "synchronization/lock_unittest.cc",
1268     "synchronization/waitable_event_unittest.cc",
1269     "synchronization/waitable_event_watcher_unittest.cc",
1270     "sys_info_unittest.cc",
1271     "system_monitor/system_monitor_unittest.cc",
1272     "task/cancelable_task_tracker_unittest.cc",
1273     "task_runner_util_unittest.cc",
1274     "template_util_unittest.cc",
1275     "test/expectations/expectation_unittest.cc",
1276     "test/expectations/parser_unittest.cc",
1277     "test/histogram_tester_unittest.cc",
1278     "test/test_reg_util_win_unittest.cc",
1279     "test/trace_event_analyzer_unittest.cc",
1280     "threading/non_thread_safe_unittest.cc",
1281     "threading/platform_thread_unittest.cc",
1282     "threading/sequenced_worker_pool_unittest.cc",
1283     "threading/simple_thread_unittest.cc",
1284     "threading/thread_checker_unittest.cc",
1285     "threading/thread_collision_warner_unittest.cc",
1286     "threading/thread_id_name_manager_unittest.cc",
1287     "threading/thread_local_storage_unittest.cc",
1288     "threading/thread_local_unittest.cc",
1289     "threading/thread_unittest.cc",
1290     "threading/watchdog_unittest.cc",
1291     "threading/worker_pool_posix_unittest.cc",
1292     "threading/worker_pool_unittest.cc",
1293     "time/pr_time_unittest.cc",
1294     "time/time_unittest.cc",
1295     "time/time_win_unittest.cc",
1296     "timer/hi_res_timer_manager_unittest.cc",
1297     "timer/mock_timer_unittest.cc",
1298     "timer/timer_unittest.cc",
1299     "tools_sanity_unittest.cc",
1300     "tracked_objects_unittest.cc",
1301     "tuple_unittest.cc",
1302     "values_unittest.cc",
1303     "version_unittest.cc",
1304     "vlog_unittest.cc",
1305     "win/dllmain.cc",
1306     "win/enum_variant_unittest.cc",
1307     "win/event_trace_consumer_unittest.cc",
1308     "win/event_trace_controller_unittest.cc",
1309     "win/event_trace_provider_unittest.cc",
1310     "win/i18n_unittest.cc",
1311     "win/iunknown_impl_unittest.cc",
1312     "win/message_window_unittest.cc",
1313     "win/object_watcher_unittest.cc",
1314     "win/pe_image_unittest.cc",
1315     "win/registry_unittest.cc",
1316     "win/scoped_bstr_unittest.cc",
1317     "win/scoped_comptr_unittest.cc",
1318     "win/scoped_process_information_unittest.cc",
1319     "win/scoped_variant_unittest.cc",
1320     "win/shortcut_unittest.cc",
1321     "win/startup_information_unittest.cc",
1322     "win/win_util_unittest.cc",
1323     "win/wrapped_window_proc_unittest.cc",
1324   ]
1326   deps = [
1327     ":base",
1328     ":i18n",
1329     ":message_loop_tests",
1330     ":prefs",
1331     ":prefs_test_support",
1332     "//base/allocator",
1333     "//base/test:run_all_unittests",
1334     "//base/test:test_support",
1335     "//base/third_party/dynamic_annotations",
1336     "//base/third_party/nspr",
1337     "//testing/gmock",
1338     "//testing/gtest",
1339     "//third_party/icu",
1340   ]
1342   if (is_ios) {
1343     sources -= [
1344       "metrics/stats_table_uinittest.cc",  # Requires spawning a process.
1345       "process/memory_unittest.cc",
1346       "process/memory_unittest_mac.h",
1347       "process/memory_unittest_mac.mm",
1348       "process/process_unittest.cc",
1349       "process/process_util_unittest.cc",
1350     ]
1352     # Pull in specific Mac files for iOS (which have been filtered out by file
1353     # name rules).
1354     set_sources_assignment_filter([])
1355     sources += [
1356       "mac/bind_objc_block_unittest.mm",
1357       "mac/foundation_util_unittest.mm",
1358       "mac/objc_property_releaser_unittest.mm",
1359       "mac/scoped_nsobject_unittest.mm",
1360       "sys_string_conversions_mac_unittest.mm",
1361     ]
1362     set_sources_assignment_filter(sources_assignment_filter)
1364     # TODO(GYP): dep on copy_test_data_ios action.
1365   }
1367   if (is_linux) {
1368     sources -= [ "file_version_info_unittest.cc" ]
1369     sources += [ "nix/xdg_util_unittest.cc" ]
1370     defines = [ "USE_SYMBOLIZE" ]
1371     configs += [ "//build/config/linux:glib" ]
1372   }
1374   if (!is_linux || use_ozone) {
1375     sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1376   }
1378   if (is_posix || is_ios) {
1379     sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1380     deps += [ "//third_party/libevent" ]
1381   }
1383   if (is_android) {
1384     deps += [
1385       "//testing/android:native_test_native_code",
1386     ]
1387     set_sources_assignment_filter([])
1388     sources += [ "debug/proc_maps_linux_unittest.cc" ]
1389     set_sources_assignment_filter(sources_assignment_filter)
1390   }
1393 if (is_android) {
1394   # GYP: //base.gyp:base_jni_headers
1395   generate_jni("base_jni_headers") {
1396     sources = [
1397       "android/java/src/org/chromium/base/ApplicationStatus.java",
1398       "android/java/src/org/chromium/base/BuildInfo.java",
1399       "android/java/src/org/chromium/base/CommandLine.java",
1400       "android/java/src/org/chromium/base/ContentUriUtils.java",
1401       "android/java/src/org/chromium/base/CpuFeatures.java",
1402       "android/java/src/org/chromium/base/EventLog.java",
1403       "android/java/src/org/chromium/base/FieldTrialList.java",
1404       "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
1405       "android/java/src/org/chromium/base/JNIUtils.java",
1406       "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
1407       "android/java/src/org/chromium/base/LocaleUtils.java",
1408       "android/java/src/org/chromium/base/MemoryPressureListener.java",
1409       "android/java/src/org/chromium/base/JavaHandlerThread.java",
1410       "android/java/src/org/chromium/base/PathService.java",
1411       "android/java/src/org/chromium/base/PathUtils.java",
1412       "android/java/src/org/chromium/base/PowerMonitor.java",
1413       "android/java/src/org/chromium/base/SystemMessageHandler.java",
1414       "android/java/src/org/chromium/base/SysUtils.java",
1415       "android/java/src/org/chromium/base/ThreadUtils.java",
1416       "android/java/src/org/chromium/base/TraceEvent.java",
1417     ]
1418     jni_package = "base"
1419   }
1421   # GYP: //base.gyp:base_java
1422   android_library("base_java") {
1423     srcjar_deps = [
1424       ":base_java_application_state",
1425       ":base_java_memory_pressure_level_list",
1426       ":base_native_libraries_gen",
1427     ]
1429     deps = [
1430       "//third_party/jsr-305:jsr_305_javalib"
1431     ]
1433     DEPRECATED_java_in_dir = "android/java/src"
1435     # A new version of NativeLibraries.java (with the actual correct values)
1436     # will be created when creating an apk.
1437     jar_excluded_patterns = [
1438       "*/NativeLibraries.class",
1439       "*/NativeLibraries##*.class",
1440     ]
1441   }
1443   # GYP: //base.gyp:base_javatests
1444   android_library("base_javatests") {
1445     deps = [
1446       ":base_java",
1447       ":base_java_test_support",
1448     ]
1449     DEPRECATED_java_in_dir = "android/javatests/src"
1450   }
1452   # GYP: //base.gyp:base_java_test_support
1453   android_library("base_java_test_support") {
1454     deps = [
1455       ":base_java",
1456     ]
1457     DEPRECATED_java_in_dir = "test/android/javatests/src"
1458   }
1460   # GYP: //base.gyp:base_java_application_state
1461   java_cpp_template("base_java_application_state") {
1462     sources = [
1463       "android/java/src/org/chromium/base/ApplicationState.template",
1464     ]
1465     inputs = [
1466       "android/application_state_list.h"
1467     ]
1469     package_name = "org/chromium/base"
1470   }
1472   # GYP: //base.gyp:base_java_memory_pressure_level_list
1473   java_cpp_template("base_java_memory_pressure_level_list") {
1474     sources = [
1475       "android/java/src/org/chromium/base/MemoryPressureLevelList.template",
1476     ]
1477     inputs = [
1478       "memory/memory_pressure_level_list.h"
1479     ]
1481     package_name = "org/chromium/base"
1482   }
1484   # GYP: //base/base.gyp:base_native_libraries_gen
1485   java_cpp_template("base_native_libraries_gen") {
1486     sources = [
1487       "android/java/templates/NativeLibraries.template",
1488     ]
1489     package_name = "org/chromium/base/library_loader"
1490   }
1492   # GYP: //base.gyp:base_java_unittest_support
1493   android_library("base_java_unittest_support") {
1494     deps = [":base_java"]
1495     java_files = [
1496       "test/android/java/src/org/chromium/base/ContentUriTestUtils.java"
1497     ]
1498   }
1500   # GYP: //base.gyp:base_unittests_apk
1501   unittest_apk("base_unittests_apk") {
1502     deps = [
1503       ":base_java",
1504       ":base_java_unittest_support",
1505       ":base_unittests",
1506     ]
1507     unittests_dep = ":base_unittests"
1508   }