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