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