bookmarks: Move bookmark_test_helpers.h into 'bookmarks' namespace.
[chromium-blink-merge.git] / base / base.gyp
blob1f801c881c00ac0eb435a9247fe1e0a4eabb6f5d
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'includes': [
10     '../build/win_precompile.gypi',
11     'base.gypi',
12   ],
13   'targets': [
14     {
15       'target_name': 'base',
16       'type': '<(component)',
17       'toolsets': ['host', 'target'],
18       'variables': {
19         'base_target': 1,
20         'enable_wexit_time_destructors': 1,
21         'optimize': 'max',
22       },
23       'dependencies': [
24         'base_static',
25         'allocator/allocator.gyp:allocator_extension_thunks',
26         '../testing/gtest.gyp:gtest_prod',
27         '../third_party/modp_b64/modp_b64.gyp:modp_b64',
28         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
29       ],
30       # TODO(gregoryd): direct_dependent_settings should be shared with the
31       #  64-bit target, but it doesn't work due to a bug in gyp
32       'direct_dependent_settings': {
33         'include_dirs': [
34           '..',
35         ],
36       },
37       'conditions': [
38         ['desktop_linux == 1 or chromeos == 1', {
39           'conditions': [
40             ['chromeos==1', {
41               'sources/': [ ['include', '_chromeos\\.cc$'] ]
42             }],
43           ],
44           'dependencies': [
45             'symbolize',
46             'xdg_mime',
47           ],
48           'defines': [
49             'USE_SYMBOLIZE',
50           ],
51         }, {  # desktop_linux == 0 and chromeos == 0
52             'sources/': [
53               ['exclude', '/xdg_user_dirs/'],
54               ['exclude', '_nss\\.cc$'],
55             ],
56         }],
57         ['use_glib==1', {
58           'dependencies': [
59             '../build/linux/system.gyp:glib',
60           ],
61           'export_dependent_settings': [
62             '../build/linux/system.gyp:glib',
63           ],
64         }],
65         ['OS == "android" and _toolset == "host"', {
66           # Always build base as a static_library for host toolset, even if
67           # we're doing a component build. Specifically, we only care about the
68           # target toolset using components since that's what developers are
69           # focusing on. In theory we should do this more generally for all
70           # targets when building for host, but getting the gyp magic
71           # per-toolset for the "component" variable is hard, and we really only
72           # need base on host.
73           'type': 'static_library',
74           # Base for host support is the minimum required to run the
75           # ssl false start blacklist tool. It requires further changes
76           # to generically support host builds (and tests).
77           # Note: when building for host, gyp has OS == "android",
78           # hence the *_android.cc files are included but the actual code
79           # doesn't have OS_ANDROID / ANDROID defined.
80           'conditions': [
81             ['host_os == "mac"', {
82               'sources/': [
83                 ['exclude', '^native_library_linux\\.cc$'],
84                 ['exclude', '^process_util_linux\\.cc$'],
85                 ['exclude', '^sys_info_linux\\.cc$'],
86                 ['exclude', '^sys_string_conversions_linux\\.cc$'],
87                 ['exclude', '^worker_pool_linux\\.cc$'],
88               ],
89             }],
90           ],
91         }],
92         ['OS == "android" and _toolset == "target"', {
93           'conditions': [
94             ['target_arch == "ia32" or target_arch == "x64"', {
95               'sources/': [
96                 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
97               ],
98             }],
99             ['target_arch == "mipsel"', {
100               'sources/': [
101                 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
102               ],
103             }],
104           ],
105           'dependencies': [
106             'base_jni_headers',
107             '../third_party/ashmem/ashmem.gyp:ashmem',
108           ],
109           'link_settings': {
110             'libraries': [
111               '-llog',
112             ],
113           },
114           'sources!': [
115             'debug/stack_trace_posix.cc',
116           ],
117           'includes': [
118             '../build/android/cpufeatures.gypi',
119           ],
120         }],
121         ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
122           'dependencies': [
123             'base_java',
124           ],
125         }],
126         ['os_bsd==1', {
127           'include_dirs': [
128             '/usr/local/include',
129           ],
130           'link_settings': {
131             'libraries': [
132               '-L/usr/local/lib -lexecinfo',
133             ],
134           },
135         }],
136         ['OS == "linux"', {
137           'link_settings': {
138             'libraries': [
139               # We need rt for clock_gettime().
140               '-lrt',
141               # For 'native_library_linux.cc'
142               '-ldl',
143             ],
144           },
145           'conditions': [
146             ['use_allocator!="tcmalloc"', {
147               'defines': [
148                 'NO_TCMALLOC',
149               ],
150               'direct_dependent_settings': {
151                 'defines': [
152                   'NO_TCMALLOC',
153                 ],
154               },
155             }],
156           ],
157         }],
158         ['OS == "win"', {
159           # Specify delayload for base.dll.
160           'msvs_settings': {
161             'VCLinkerTool': {
162               'DelayLoadDLLs': [
163                 'cfgmgr32.dll',
164                 'powrprof.dll',
165                 'setupapi.dll',
166               ],
167               'AdditionalDependencies': [
168                 'cfgmgr32.lib',
169                 'powrprof.lib',
170                 'setupapi.lib',
171               ],
172             },
173           },
174           # Specify delayload for components that link with base.lib.
175           'all_dependent_settings': {
176             'msvs_settings': {
177               'VCLinkerTool': {
178                 'DelayLoadDLLs': [
179                   'cfgmgr32.dll',
180                   'powrprof.dll',
181                   'setupapi.dll',
182                 ],
183                 'AdditionalDependencies': [
184                   'cfgmgr32.lib',
185                   'powrprof.lib',
186                   'setupapi.lib',
187                 ],
188               },
189             },
190           },
191         }],
192         ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
193           'link_settings': {
194             'libraries': [
195               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
196               '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
197               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
198               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
199               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
200               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
201               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
202             ],
203           },
204           'dependencies': [
205             '../third_party/mach_override/mach_override.gyp:mach_override',
206           ],
207         }],
208         ['OS == "ios" and _toolset != "host"', {
209           'link_settings': {
210             'libraries': [
211               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
212               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
213               '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
214               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
215               '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
216             ],
217           },
218         }],
219         ['OS != "win" and OS != "ios"', {
220             'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
221         },],
222         ['component=="shared_library"', {
223           'conditions': [
224             ['OS=="win"', {
225               'sources!': [
226                 'debug/debug_on_start_win.cc',
227               ],
228             }],
229           ],
230         }],
231       ],
232       'sources': [
233         'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
234         'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
235         'async_socket_io_handler.h',
236         'async_socket_io_handler_posix.cc',
237         'async_socket_io_handler_win.cc',
238         'auto_reset.h',
239         'event_recorder.h',
240         'event_recorder_stubs.cc',
241         'event_recorder_win.cc',
242         'linux_util.cc',
243         'linux_util.h',
244         'message_loop/message_pump_android.cc',
245         'message_loop/message_pump_android.h',
246         'message_loop/message_pump_glib.cc',
247         'message_loop/message_pump_glib.h',
248         'message_loop/message_pump_io_ios.cc',
249         'message_loop/message_pump_io_ios.h',
250         'message_loop/message_pump_libevent.cc',
251         'message_loop/message_pump_libevent.h',
252         'message_loop/message_pump_mac.h',
253         'message_loop/message_pump_mac.mm',
254         'metrics/field_trial.cc',
255         'metrics/field_trial.h',
256         'posix/file_descriptor_shuffle.cc',
257         'posix/file_descriptor_shuffle.h',
258         'sync_socket.h',
259         'sync_socket_win.cc',
260         'sync_socket_posix.cc',
261       ],
262       'includes': [
263         '../build/android/increase_size_for_speed.gypi',
264       ],
265     },
266     {
267       'target_name': 'base_i18n',
268       'type': '<(component)',
269       'variables': {
270         'enable_wexit_time_destructors': 1,
271         'optimize': 'max',
272         'base_i18n_target': 1,
273       },
274       'dependencies': [
275         'base',
276         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
277         '../third_party/icu/icu.gyp:icui18n',
278         '../third_party/icu/icu.gyp:icuuc',
279       ],
280       'conditions': [
281         ['OS == "win"', {
282           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
283           'msvs_disabled_warnings': [
284             4267,
285           ],
286         }],
287         ['icu_use_data_file_flag==1', {
288           'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
289         }, { # else icu_use_data_file_flag !=1
290           'conditions': [
291             ['OS=="win"', {
292               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
293             }, {
294               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
295             }],
296           ],
297         }],
298       ],
299       'export_dependent_settings': [
300         'base',
301       ],
302       'includes': [
303         '../build/android/increase_size_for_speed.gypi',
304       ],
305     },
306     {
307       'target_name': 'base_message_loop_tests',
308       'type': 'static_library',
309       'dependencies': [
310         'base',
311         '../testing/gtest.gyp:gtest',
312       ],
313       'sources': [
314         'message_loop/message_loop_test.cc',
315         'message_loop/message_loop_test.h',
316       ],
317     },
318     {
319       'target_name': 'base_prefs',
320       'type': '<(component)',
321       'variables': {
322         'enable_wexit_time_destructors': 1,
323         'optimize': 'max',
324       },
325       'dependencies': [
326         'base',
327       ],
328       'export_dependent_settings': [
329         'base',
330       ],
331       'defines': [
332         'BASE_PREFS_IMPLEMENTATION',
333       ],
334       'sources': [
335         'prefs/base_prefs_export.h',
336         'prefs/default_pref_store.cc',
337         'prefs/default_pref_store.h',
338         'prefs/json_pref_store.cc',
339         'prefs/json_pref_store.h',
340         'prefs/overlay_user_pref_store.cc',
341         'prefs/overlay_user_pref_store.h',
342         'prefs/persistent_pref_store.h',
343         'prefs/pref_change_registrar.cc',
344         'prefs/pref_change_registrar.h',
345         'prefs/pref_filter.h',
346         'prefs/pref_member.cc',
347         'prefs/pref_member.h',
348         'prefs/pref_notifier.h',
349         'prefs/pref_notifier_impl.cc',
350         'prefs/pref_notifier_impl.h',
351         'prefs/pref_observer.h',
352         'prefs/pref_registry.cc',
353         'prefs/pref_registry.h',
354         'prefs/pref_registry_simple.cc',
355         'prefs/pref_registry_simple.h',
356         'prefs/pref_service.cc',
357         'prefs/pref_service.h',
358         'prefs/pref_service_factory.cc',
359         'prefs/pref_service_factory.h',
360         'prefs/pref_store.cc',
361         'prefs/pref_store.h',
362         'prefs/pref_value_map.cc',
363         'prefs/pref_value_map.h',
364         'prefs/pref_value_store.cc',
365         'prefs/pref_value_store.h',
366         'prefs/scoped_user_pref_update.cc',
367         'prefs/scoped_user_pref_update.h',
368         'prefs/value_map_pref_store.cc',
369         'prefs/value_map_pref_store.h',
370         'prefs/writeable_pref_store.h',
371       ],
372       'includes': [
373         '../build/android/increase_size_for_speed.gypi',
374       ],
375     },
376     {
377       'target_name': 'base_prefs_test_support',
378       'type': 'static_library',
379       'dependencies': [
380         'base',
381         'base_prefs',
382         '../testing/gmock.gyp:gmock',
383       ],
384       'sources': [
385         'prefs/mock_pref_change_callback.cc',
386         'prefs/pref_store_observer_mock.cc',
387         'prefs/pref_store_observer_mock.h',
388         'prefs/testing_pref_service.cc',
389         'prefs/testing_pref_service.h',
390         'prefs/testing_pref_store.cc',
391         'prefs/testing_pref_store.h',
392       ],
393     },
394     {
395       # This is the subset of files from base that should not be used with a
396       # dynamic library. Note that this library cannot depend on base because
397       # base depends on base_static.
398       'target_name': 'base_static',
399       'type': 'static_library',
400       'variables': {
401         'enable_wexit_time_destructors': 1,
402         'optimize': 'max',
403       },
404       'toolsets': ['host', 'target'],
405       'sources': [
406         'base_switches.cc',
407         'base_switches.h',
408         'win/pe_image.cc',
409         'win/pe_image.h',
410       ],
411       'include_dirs': [
412         '..',
413       ],
414       'includes': [
415         '../build/android/increase_size_for_speed.gypi',
416       ],
417     },
418     # Include this target for a main() function that simply instantiates
419     # and runs a base::TestSuite.
420     {
421       'target_name': 'run_all_unittests',
422       'type': 'static_library',
423       'dependencies': [
424         'test_support_base',
425       ],
426       'sources': [
427         'test/run_all_unittests.cc',
428       ],
429     },
430     {
431       'target_name': 'base_unittests',
432       'type': '<(gtest_target_type)',
433       'sources': [
434         'android/application_status_listener_unittest.cc',
435         'android/jni_android_unittest.cc',
436         'android/jni_array_unittest.cc',
437         'android/jni_string_unittest.cc',
438         'android/path_utils_unittest.cc',
439         'android/scoped_java_ref_unittest.cc',
440         'android/sys_utils_unittest.cc',
441         'async_socket_io_handler_unittest.cc',
442         'at_exit_unittest.cc',
443         'atomicops_unittest.cc',
444         'barrier_closure_unittest.cc',
445         'base64_unittest.cc',
446         'big_endian_unittest.cc',
447         'bind_unittest.cc',
448         'bind_unittest.nc',
449         'bits_unittest.cc',
450         'build_time_unittest.cc',
451         'callback_helpers_unittest.cc',
452         'callback_list_unittest.cc',
453         'callback_list_unittest.nc',
454         'callback_unittest.cc',
455         'callback_unittest.nc',
456         'cancelable_callback_unittest.cc',
457         'command_line_unittest.cc',
458         'containers/adapters_unittest.cc',
459         'containers/hash_tables_unittest.cc',
460         'containers/linked_list_unittest.cc',
461         'containers/mru_cache_unittest.cc',
462         'containers/small_map_unittest.cc',
463         'containers/stack_container_unittest.cc',
464         'cpu_unittest.cc',
465         'debug/crash_logging_unittest.cc',
466         'debug/leak_tracker_unittest.cc',
467         'debug/proc_maps_linux_unittest.cc',
468         'debug/stack_trace_unittest.cc',
469         'debug/task_annotator_unittest.cc',
470         'debug/trace_event_argument_unittest.cc',
471         'debug/trace_event_memory_unittest.cc',
472         'debug/trace_event_synthetic_delay_unittest.cc',
473         'debug/trace_event_system_stats_monitor_unittest.cc',
474         'debug/trace_event_unittest.cc',
475         'debug/trace_event_unittest.h',
476         'debug/trace_event_win_unittest.cc',
477         'deferred_sequenced_task_runner_unittest.cc',
478         'environment_unittest.cc',
479         'file_version_info_unittest.cc',
480         'files/dir_reader_posix_unittest.cc',
481         'files/file_path_unittest.cc',
482         'files/file_proxy_unittest.cc',
483         'files/file_unittest.cc',
484         'files/file_util_proxy_unittest.cc',
485         'files/file_util_unittest.cc',
486         'files/important_file_writer_unittest.cc',
487         'files/memory_mapped_file_unittest.cc',
488         'files/scoped_temp_dir_unittest.cc',
489         'gmock_unittest.cc',
490         'guid_unittest.cc',
491         'hash_unittest.cc',
492         'id_map_unittest.cc',
493         'i18n/break_iterator_unittest.cc',
494         'i18n/char_iterator_unittest.cc',
495         'i18n/case_conversion_unittest.cc',
496         'i18n/file_util_icu_unittest.cc',
497         'i18n/icu_string_conversions_unittest.cc',
498         'i18n/number_formatting_unittest.cc',
499         'i18n/rtl_unittest.cc',
500         'i18n/streaming_utf8_validator_unittest.cc',
501         'i18n/string_search_unittest.cc',
502         'i18n/time_formatting_unittest.cc',
503         'i18n/timezone_unittest.cc',
504         'ios/device_util_unittest.mm',
505         'json/json_parser_unittest.cc',
506         'json/json_reader_unittest.cc',
507         'json/json_value_converter_unittest.cc',
508         'json/json_value_serializer_unittest.cc',
509         'json/json_writer_unittest.cc',
510         'json/string_escape_unittest.cc',
511         'lazy_instance_unittest.cc',
512         'logging_unittest.cc',
513         'mac/bind_objc_block_unittest.mm',
514         'mac/foundation_util_unittest.mm',
515         'mac/libdispatch_task_runner_unittest.cc',
516         'mac/mac_util_unittest.mm',
517         'mac/objc_property_releaser_unittest.mm',
518         'mac/scoped_nsobject_unittest.mm',
519         'mac/scoped_objc_class_swizzler_unittest.mm',
520         'mac/scoped_sending_event_unittest.mm',
521         'md5_unittest.cc',
522         'memory/aligned_memory_unittest.cc',
523         'memory/discardable_memory_manager_unittest.cc',
524         'memory/discardable_memory_unittest.cc',
525         'memory/linked_ptr_unittest.cc',
526         'memory/ref_counted_memory_unittest.cc',
527         'memory/ref_counted_unittest.cc',
528         'memory/scoped_ptr_unittest.cc',
529         'memory/scoped_ptr_unittest.nc',
530         'memory/scoped_vector_unittest.cc',
531         'memory/shared_memory_unittest.cc',
532         'memory/singleton_unittest.cc',
533         'memory/weak_ptr_unittest.cc',
534         'memory/weak_ptr_unittest.nc',
535         'message_loop/message_loop_proxy_impl_unittest.cc',
536         'message_loop/message_loop_proxy_unittest.cc',
537         'message_loop/message_loop_unittest.cc',
538         'message_loop/message_pump_glib_unittest.cc',
539         'message_loop/message_pump_io_ios_unittest.cc',
540         'message_loop/message_pump_libevent_unittest.cc',
541         'metrics/sample_map_unittest.cc',
542         'metrics/sample_vector_unittest.cc',
543         'metrics/bucket_ranges_unittest.cc',
544         'metrics/field_trial_unittest.cc',
545         'metrics/histogram_base_unittest.cc',
546         'metrics/histogram_delta_serialization_unittest.cc',
547         'metrics/histogram_snapshot_manager_unittest.cc',
548         'metrics/histogram_unittest.cc',
549         'metrics/sparse_histogram_unittest.cc',
550         'metrics/stats_table_unittest.cc',
551         'metrics/statistics_recorder_unittest.cc',
552         'observer_list_unittest.cc',
553         'os_compat_android_unittest.cc',
554         'path_service_unittest.cc',
555         'pickle_unittest.cc',
556         'posix/file_descriptor_shuffle_unittest.cc',
557         'posix/unix_domain_socket_linux_unittest.cc',
558         'power_monitor/power_monitor_unittest.cc',
559         'prefs/default_pref_store_unittest.cc',
560         'prefs/json_pref_store_unittest.cc',
561         'prefs/mock_pref_change_callback.h',
562         'prefs/overlay_user_pref_store_unittest.cc',
563         'prefs/pref_change_registrar_unittest.cc',
564         'prefs/pref_member_unittest.cc',
565         'prefs/pref_notifier_impl_unittest.cc',
566         'prefs/pref_service_unittest.cc',
567         'prefs/pref_value_map_unittest.cc',
568         'prefs/pref_value_store_unittest.cc',
569         'prefs/scoped_user_pref_update_unittest.cc',
570         'process/memory_unittest.cc',
571         'process/memory_unittest_mac.h',
572         'process/memory_unittest_mac.mm',
573         'process/process_metrics_unittest.cc',
574         'process/process_metrics_unittest_ios.cc',
575         'process/process_unittest.cc',
576         'process/process_util_unittest.cc',
577         'profiler/tracked_time_unittest.cc',
578         'rand_util_unittest.cc',
579         'numerics/safe_numerics_unittest.cc',
580         'scoped_clear_errno_unittest.cc',
581         'scoped_generic_unittest.cc',
582         'scoped_native_library_unittest.cc',
583         'security_unittest.cc',
584         'sequence_checker_unittest.cc',
585         'sha1_unittest.cc',
586         'stl_util_unittest.cc',
587         'strings/nullable_string16_unittest.cc',
588         'strings/safe_sprintf_unittest.cc',
589         'strings/string16_unittest.cc',
590         'strings/stringprintf_unittest.cc',
591         'strings/string_number_conversions_unittest.cc',
592         'strings/string_piece_unittest.cc',
593         'strings/string_split_unittest.cc',
594         'strings/string_tokenizer_unittest.cc',
595         'strings/string_util_unittest.cc',
596         'strings/stringize_macros_unittest.cc',
597         'strings/sys_string_conversions_mac_unittest.mm',
598         'strings/sys_string_conversions_unittest.cc',
599         'strings/utf_offset_string_conversions_unittest.cc',
600         'strings/utf_string_conversions_unittest.cc',
601         'supports_user_data_unittest.cc',
602         'sync_socket_unittest.cc',
603         'synchronization/cancellation_flag_unittest.cc',
604         'synchronization/condition_variable_unittest.cc',
605         'synchronization/lock_unittest.cc',
606         'synchronization/waitable_event_unittest.cc',
607         'synchronization/waitable_event_watcher_unittest.cc',
608         'sys_info_unittest.cc',
609         'system_monitor/system_monitor_unittest.cc',
610         'task/cancelable_task_tracker_unittest.cc',
611         'task_runner_util_unittest.cc',
612         'template_util_unittest.cc',
613         'test/expectations/expectation_unittest.cc',
614         'test/expectations/parser_unittest.cc',
615         'test/histogram_tester_unittest.cc',
616         'test/test_pending_task_unittest.cc',
617         'test/test_reg_util_win_unittest.cc',
618         'test/trace_event_analyzer_unittest.cc',
619         'threading/non_thread_safe_unittest.cc',
620         'threading/platform_thread_unittest.cc',
621         'threading/sequenced_worker_pool_unittest.cc',
622         'threading/simple_thread_unittest.cc',
623         'threading/thread_checker_unittest.cc',
624         'threading/thread_collision_warner_unittest.cc',
625         'threading/thread_id_name_manager_unittest.cc',
626         'threading/thread_local_storage_unittest.cc',
627         'threading/thread_local_unittest.cc',
628         'threading/thread_unittest.cc',
629         'threading/watchdog_unittest.cc',
630         'threading/worker_pool_posix_unittest.cc',
631         'threading/worker_pool_unittest.cc',
632         'time/pr_time_unittest.cc',
633         'time/time_unittest.cc',
634         'time/time_win_unittest.cc',
635         'timer/hi_res_timer_manager_unittest.cc',
636         'timer/mock_timer_unittest.cc',
637         'timer/timer_unittest.cc',
638         'tools_sanity_unittest.cc',
639         'tracked_objects_unittest.cc',
640         'tuple_unittest.cc',
641         'values_unittest.cc',
642         'version_unittest.cc',
643         'vlog_unittest.cc',
644         'win/dllmain.cc',
645         'win/enum_variant_unittest.cc',
646         'win/event_trace_consumer_unittest.cc',
647         'win/event_trace_controller_unittest.cc',
648         'win/event_trace_provider_unittest.cc',
649         'win/i18n_unittest.cc',
650         'win/iunknown_impl_unittest.cc',
651         'win/message_window_unittest.cc',
652         'win/object_watcher_unittest.cc',
653         'win/pe_image_unittest.cc',
654         'win/registry_unittest.cc',
655         'win/scoped_bstr_unittest.cc',
656         'win/scoped_comptr_unittest.cc',
657         'win/scoped_process_information_unittest.cc',
658         'win/scoped_variant_unittest.cc',
659         'win/shortcut_unittest.cc',
660         'win/startup_information_unittest.cc',
661         'win/win_util_unittest.cc',
662         'win/wrapped_window_proc_unittest.cc',
663       ],
664       'dependencies': [
665         'base',
666         'base_i18n',
667         'base_message_loop_tests',
668         'base_prefs',
669         'base_prefs_test_support',
670         'base_static',
671         'run_all_unittests',
672         'test_support_base',
673         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
674         '../testing/gmock.gyp:gmock',
675         '../testing/gtest.gyp:gtest',
676         '../third_party/icu/icu.gyp:icui18n',
677         '../third_party/icu/icu.gyp:icuuc',
678       ],
679       'includes': ['../build/nocompile.gypi'],
680       'variables': {
681          # TODO(ajwong): Is there a way to autodetect this?
682         'module_dir': 'base'
683       },
684       'conditions': [
685         ['OS == "android"', {
686           'dependencies': [
687             'android/jni_generator/jni_generator.gyp:jni_generator_tests',
688             '../testing/android/native_test.gyp:native_test_native_code',
689           ],
690         }],
691         ['OS == "ios" and _toolset != "host"', {
692           'sources/': [
693             # Only test the iOS-meaningful portion of process_utils.
694             ['exclude', '^process/memory_unittest'],
695             ['exclude', '^process/process_unittest\\.cc$'],
696             ['exclude', '^process/process_util_unittest\\.cc$'],
697             ['include', '^process/process_util_unittest_ios\\.cc$'],
698             # Requires spawning processes.
699             ['exclude', '^metrics/stats_table_unittest\\.cc$'],
700             # iOS does not use message_pump_libevent.
701             ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
702           ],
703           'actions': [
704             {
705               'action_name': 'copy_test_data',
706               'variables': {
707                 'test_data_files': [
708                   'test/data',
709                 ],
710                 'test_data_prefix': 'base',
711               },
712               'includes': [ '../build/copy_test_data_ios.gypi' ],
713             },
714           ],
715         }],
716         ['desktop_linux == 1 or chromeos == 1', {
717           'defines': [
718             'USE_SYMBOLIZE',
719           ],
720           'sources!': [
721             'file_version_info_unittest.cc',
722           ],
723           'conditions': [
724             [ 'desktop_linux==1', {
725               'sources': [
726                 'nix/xdg_util_unittest.cc',
727               ],
728             }],
729           ],
730         }],
731         ['use_glib == 1', {
732           'dependencies': [
733             '../build/linux/system.gyp:glib',
734           ],
735         }, {  # use_glib == 0
736           'sources!': [
737             'message_loop/message_pump_glib_unittest.cc',
738           ]
739         }],
740         ['use_ozone == 1', {
741           'sources!': [
742             'message_loop/message_pump_glib_unittest.cc',
743           ]
744         }],
745         ['OS == "linux" and use_allocator!="none"', {
746             'dependencies': [
747               'allocator/allocator.gyp:allocator',
748             ],
749           },
750         ],
751         ['OS == "win"', {
752           'sources!': [
753             'file_descriptor_shuffle_unittest.cc',
754             'files/dir_reader_posix_unittest.cc',
755             'threading/worker_pool_posix_unittest.cc',
756             'message_loop/message_pump_libevent_unittest.cc',
757           ],
758           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
759           'msvs_disabled_warnings': [
760             4267,
761           ],
762           'conditions': [
763             # This is needed so base_unittests uses the allocator shim, as
764             # SecurityTest.MemoryAllocationRestriction* tests are dependent
765             # on tcmalloc.
766             # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
767             # their own test suite.
768             ['win_use_allocator_shim==1', {
769               'dependencies': [
770                 'allocator/allocator.gyp:allocator',
771               ],
772             }],
773             ['icu_use_data_file_flag==0', {
774               # This is needed to trigger the dll copy step on windows.
775               # TODO(mark): This should not be necessary.
776               'dependencies': [
777                 '../third_party/icu/icu.gyp:icudata',
778               ],
779             }],
780             ['incremental_chrome_dll', {
781               'defines': [
782                 # Used only to workaround a linker bug, do not use this
783                 # otherwise, and don't make it broader scope. See
784                 # http://crbug.com/251251.
785                 'INCREMENTAL_LINKING',
786               ],
787             }],
788           ],
789         }, {  # OS != "win"
790           'dependencies': [
791             '../third_party/libevent/libevent.gyp:libevent'
792           ],
793         }],
794       ],  # conditions
795       'target_conditions': [
796         ['OS == "ios" and _toolset != "host"', {
797           'sources/': [
798             # Pull in specific Mac files for iOS (which have been filtered out
799             # by file name rules).
800             ['include', '^mac/bind_objc_block_unittest\\.mm$'],
801             ['include', '^mac/foundation_util_unittest\\.mm$',],
802             ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
803             ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
804             ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
805           ],
806         }],
807         ['OS == "android" and _toolset == "target"', {
808           'sources': [
809             'memory/discardable_memory_ashmem_allocator_unittest.cc',
810           ],
811         }],
812         ['OS == "android"', {
813           'sources/': [
814             ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
815           ],
816         }],
817       ],  # target_conditions
818     },
819     {
820       'target_name': 'base_perftests',
821       'type': '<(gtest_target_type)',
822       'dependencies': [
823         'base',
824         'test_support_base',
825         '../testing/gtest.gyp:gtest',
826       ],
827       'sources': [
828         'threading/thread_perftest.cc',
829         'message_loop/message_pump_perftest.cc',
830         'test/run_all_unittests.cc',
831         '../testing/perf/perf_test.cc'
832       ],
833       'conditions': [
834         ['OS == "android"', {
835           'dependencies': [
836             '../testing/android/native_test.gyp:native_test_native_code',
837           ],
838         }],
839       ],
840     },
841     {
842       'target_name': 'base_i18n_perftests',
843       'type': '<(gtest_target_type)',
844       'dependencies': [
845         'test_support_base',
846         'test_support_perf',
847         '../testing/gtest.gyp:gtest',
848         'base_i18n',
849         'base',
850       ],
851       'sources': [
852         'i18n/streaming_utf8_validator_perftest.cc',
853       ],
854     },
855     {
856       # GN: //base/test:test_support
857       'target_name': 'test_support_base',
858       'type': 'static_library',
859       'dependencies': [
860         'base',
861         'base_static',
862         'base_i18n',
863         '../testing/gmock.gyp:gmock',
864         '../testing/gtest.gyp:gtest',
865         '../third_party/libxml/libxml.gyp:libxml',
866         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
867       ],
868       'export_dependent_settings': [
869         'base',
870       ],
871       'conditions': [
872         ['os_posix==0', {
873           'sources!': [
874             'test/scoped_locale.cc',
875             'test/scoped_locale.h',
876           ],
877         }],
878         ['os_bsd==1', {
879           'sources!': [
880             'test/test_file_util_linux.cc',
881           ],
882         }],
883         ['OS == "android"', {
884           'dependencies': [
885             'base_unittests_jni_headers',
886             'base_java_unittest_support',
887           ],
888         }],
889       ],
890       'sources': [
891         'test/expectations/expectation.cc',
892         'test/expectations/expectation.h',
893         'test/expectations/parser.cc',
894         'test/expectations/parser.h',
895         'test/gtest_xml_util.cc',
896         'test/gtest_xml_util.h',
897         'test/launcher/test_launcher.cc',
898         'test/launcher/test_launcher.h',
899         'test/launcher/test_result.cc',
900         'test/launcher/test_result.h',
901         'test/launcher/test_results_tracker.cc',
902         'test/launcher/test_results_tracker.h',
903         'test/launcher/unit_test_launcher.cc',
904         'test/launcher/unit_test_launcher.h',
905         'test/launcher/unit_test_launcher_ios.cc',
906         'test/mock_chrome_application_mac.h',
907         'test/mock_chrome_application_mac.mm',
908         'test/mock_devices_changed_observer.cc',
909         'test/mock_devices_changed_observer.h',
910         'test/mock_time_provider.cc',
911         'test/mock_time_provider.h',
912         'test/multiprocess_test.cc',
913         'test/multiprocess_test.h',
914         'test/multiprocess_test_android.cc',
915         'test/null_task_runner.cc',
916         'test/null_task_runner.h',
917         'test/opaque_ref_counted.cc',
918         'test/opaque_ref_counted.h',
919         'test/perf_log.cc',
920         'test/perf_log.h',
921         'test/perf_test_suite.cc',
922         'test/perf_test_suite.h',
923         'test/perf_time_logger.cc',
924         'test/perf_time_logger.h',
925         'test/power_monitor_test_base.cc',
926         'test/power_monitor_test_base.h',
927         'test/scoped_locale.cc',
928         'test/scoped_locale.h',
929         'test/scoped_path_override.cc',
930         'test/scoped_path_override.h',
931         'test/sequenced_task_runner_test_template.cc',
932         'test/sequenced_task_runner_test_template.h',
933         'test/sequenced_worker_pool_owner.cc',
934         'test/sequenced_worker_pool_owner.h',
935         'test/simple_test_clock.cc',
936         'test/simple_test_clock.h',
937         'test/simple_test_tick_clock.cc',
938         'test/simple_test_tick_clock.h',
939         'test/histogram_tester.cc',
940         'test/histogram_tester.h',
941         'test/task_runner_test_template.cc',
942         'test/task_runner_test_template.h',
943         'test/test_file_util.cc',
944         'test/test_file_util.h',
945         'test/test_file_util_android.cc',
946         'test/test_file_util_linux.cc',
947         'test/test_file_util_mac.cc',
948         'test/test_file_util_posix.cc',
949         'test/test_file_util_win.cc',
950         'test/test_io_thread.cc',
951         'test/test_io_thread.h',
952         'test/test_listener_ios.h',
953         'test/test_listener_ios.mm',
954         'test/test_pending_task.cc',
955         'test/test_pending_task.h',
956         'test/test_reg_util_win.cc',
957         'test/test_reg_util_win.h',
958         'test/test_shortcut_win.cc',
959         'test/test_shortcut_win.h',
960         'test/test_simple_task_runner.cc',
961         'test/test_simple_task_runner.h',
962         'test/test_suite.cc',
963         'test/test_suite.h',
964         'test/test_support_android.cc',
965         'test/test_support_android.h',
966         'test/test_support_ios.h',
967         'test/test_support_ios.mm',
968         'test/test_switches.cc',
969         'test/test_switches.h',
970         'test/test_timeouts.cc',
971         'test/test_timeouts.h',
972         'test/thread_test_helper.cc',
973         'test/thread_test_helper.h',
974         'test/trace_event_analyzer.cc',
975         'test/trace_event_analyzer.h',
976         'test/trace_to_file.cc',
977         'test/trace_to_file.h',
978         'test/values_test_util.cc',
979         'test/values_test_util.h',
980       ],
981       'target_conditions': [
982         ['OS == "ios"', {
983           'sources/': [
984             # Pull in specific Mac files for iOS (which have been filtered out
985             # by file name rules).
986             ['include', '^test/test_file_util_mac\\.cc$'],
987           ],
988           'sources!': [
989             # iOS uses its own unit test launcher.
990             'test/launcher/unit_test_launcher.cc',
991           ],
992         }],
993       ],  # target_conditions
994     },
995     {
996       'target_name': 'test_support_perf',
997       'type': 'static_library',
998       'dependencies': [
999         'base',
1000         'test_support_base',
1001         '../testing/gtest.gyp:gtest',
1002       ],
1003       'sources': [
1004         'test/run_all_perftests.cc',
1005       ],
1006       'direct_dependent_settings': {
1007         'defines': [
1008           'PERF_TEST',
1009         ],
1010       },
1011     },
1012   ],
1013   'conditions': [
1014     ['OS!="ios"', {
1015       'targets': [
1016         {
1017           'target_name': 'check_example',
1018           'type': 'executable',
1019           'sources': [
1020             'check_example.cc',
1021           ],
1022           'dependencies': [
1023             'base',
1024           ],
1025         },
1026         {
1027           'target_name': 'build_utf8_validator_tables',
1028           'type': 'executable',
1029           'toolsets': ['host'],
1030           'dependencies': [
1031             'base',
1032             '../third_party/icu/icu.gyp:icuuc',
1033           ],
1034           'sources': [
1035             'i18n/build_utf8_validator_tables.cc'
1036           ],
1037         },
1038       ],
1039     }],
1040     ['OS == "win" and target_arch=="ia32"', {
1041       'targets': [
1042         # The base_win64 target here allows us to use base for Win64 targets
1043         # (the normal build is 32 bits).
1044         {
1045           'target_name': 'base_win64',
1046           'type': '<(component)',
1047           'variables': {
1048             'base_target': 1,
1049           },
1050           'dependencies': [
1051             'base_static_win64',
1052             'allocator/allocator.gyp:allocator_extension_thunks_win64',
1053             '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
1054             'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1055           ],
1056           # TODO(gregoryd): direct_dependent_settings should be shared with the
1057           # 32-bit target, but it doesn't work due to a bug in gyp
1058           'direct_dependent_settings': {
1059             'include_dirs': [
1060               '..',
1061             ],
1062           },
1063           'defines': [
1064             'BASE_WIN64',
1065             '<@(nacl_win64_defines)',
1066           ],
1067           'configurations': {
1068             'Common_Base': {
1069               'msvs_target_platform': 'x64',
1070             },
1071           },
1072           'conditions': [
1073             ['component == "shared_library"', {
1074               'sources!': [
1075                 'debug/debug_on_start_win.cc',
1076               ],
1077             }],
1078           ],
1079           # Specify delayload for base_win64.dll.
1080           'msvs_settings': {
1081             'VCLinkerTool': {
1082               'DelayLoadDLLs': [
1083                 'cfgmgr32.dll',
1084                 'powrprof.dll',
1085                 'setupapi.dll',
1086               ],
1087               'AdditionalDependencies': [
1088                 'cfgmgr32.lib',
1089                 'powrprof.lib',
1090                 'setupapi.lib',
1091               ],
1092             },
1093           },
1094           # Specify delayload for components that link with base_win64.lib.
1095           'all_dependent_settings': {
1096             'msvs_settings': {
1097               'VCLinkerTool': {
1098                 'DelayLoadDLLs': [
1099                   'cfgmgr32.dll',
1100                   'powrprof.dll',
1101                   'setupapi.dll',
1102                 ],
1103                 'AdditionalDependencies': [
1104                   'cfgmgr32.lib',
1105                   'powrprof.lib',
1106                   'setupapi.lib',
1107                 ],
1108               },
1109             },
1110           },
1111           # TODO(rvargas): Bug 78117. Remove this.
1112           'msvs_disabled_warnings': [
1113             4244,
1114             4996,
1115             4267,
1116           ],
1117           'sources': [
1118             'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
1119             'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
1120             'async_socket_io_handler.h',
1121             'async_socket_io_handler_posix.cc',
1122             'async_socket_io_handler_win.cc',
1123             'auto_reset.h',
1124             'event_recorder.h',
1125             'event_recorder_stubs.cc',
1126             'event_recorder_win.cc',
1127             'linux_util.cc',
1128             'linux_util.h',
1129             'md5.cc',
1130             'md5.h',
1131             'message_loop/message_pump_libevent.cc',
1132             'message_loop/message_pump_libevent.h',
1133             'metrics/field_trial.cc',
1134             'metrics/field_trial.h',
1135             'posix/file_descriptor_shuffle.cc',
1136             'posix/file_descriptor_shuffle.h',
1137             'sync_socket.h',
1138             'sync_socket_win.cc',
1139             'sync_socket_posix.cc',
1140           ],
1141         },
1142         {
1143           'target_name': 'base_i18n_nacl_win64',
1144           'type': '<(component)',
1145           # TODO(gregoryd): direct_dependent_settings should be shared with the
1146           # 32-bit target, but it doesn't work due to a bug in gyp
1147           'direct_dependent_settings': {
1148             'include_dirs': [
1149               '..',
1150             ],
1151           },
1152           'defines': [
1153             '<@(nacl_win64_defines)',
1154             'BASE_I18N_IMPLEMENTATION',
1155           ],
1156           'include_dirs': [
1157             '..',
1158           ],
1159           'sources': [
1160             'i18n/icu_util_nacl_win64.cc',
1161           ],
1162           'configurations': {
1163             'Common_Base': {
1164               'msvs_target_platform': 'x64',
1165             },
1166           },
1167         },
1168         {
1169           # TODO(rvargas): Remove this when gyp finally supports a clean model.
1170           # See bug 36232.
1171           'target_name': 'base_static_win64',
1172           'type': 'static_library',
1173           'sources': [
1174             'base_switches.cc',
1175             'base_switches.h',
1176             'win/pe_image.cc',
1177             'win/pe_image.h',
1178           ],
1179           'sources!': [
1180             # base64.cc depends on modp_b64.
1181             'base64.cc',
1182           ],
1183           'include_dirs': [
1184             '..',
1185           ],
1186           'configurations': {
1187             'Common_Base': {
1188               'msvs_target_platform': 'x64',
1189             },
1190           },
1191           'defines': [
1192             '<@(nacl_win64_defines)',
1193           ],
1194           # TODO(rvargas): Bug 78117. Remove this.
1195           'msvs_disabled_warnings': [
1196             4244,
1197           ],
1198         },
1199       ],
1200     }],
1201     ['os_posix==1 and OS!="mac" and OS!="ios"', {
1202       'targets': [
1203         {
1204           'target_name': 'symbolize',
1205           'type': 'static_library',
1206           'toolsets': ['host', 'target'],
1207           'variables': {
1208             'chromium_code': 0,
1209           },
1210           'conditions': [
1211             ['OS == "solaris"', {
1212               'include_dirs': [
1213                 '/usr/gnu/include',
1214                 '/usr/gnu/include/libelf',
1215               ],
1216             },],
1217           ],
1218           'cflags': [
1219             '-Wno-sign-compare',
1220           ],
1221           'cflags!': [
1222             '-Wextra',
1223           ],
1224           'defines': [
1225             'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
1226           ],
1227           'sources': [
1228             'third_party/symbolize/config.h',
1229             'third_party/symbolize/demangle.cc',
1230             'third_party/symbolize/demangle.h',
1231             'third_party/symbolize/glog/logging.h',
1232             'third_party/symbolize/glog/raw_logging.h',
1233             'third_party/symbolize/symbolize.cc',
1234             'third_party/symbolize/symbolize.h',
1235             'third_party/symbolize/utilities.h',
1236           ],
1237           'include_dirs': [
1238             '..',
1239           ],
1240           'includes': [
1241             '../build/android/increase_size_for_speed.gypi',
1242           ],
1243         },
1244         {
1245           'target_name': 'xdg_mime',
1246           'type': 'static_library',
1247           'toolsets': ['host', 'target'],
1248           'variables': {
1249             'chromium_code': 0,
1250           },
1251           'cflags!': [
1252             '-Wextra',
1253           ],
1254           'sources': [
1255             'third_party/xdg_mime/xdgmime.c',
1256             'third_party/xdg_mime/xdgmime.h',
1257             'third_party/xdg_mime/xdgmimealias.c',
1258             'third_party/xdg_mime/xdgmimealias.h',
1259             'third_party/xdg_mime/xdgmimecache.c',
1260             'third_party/xdg_mime/xdgmimecache.h',
1261             'third_party/xdg_mime/xdgmimeglob.c',
1262             'third_party/xdg_mime/xdgmimeglob.h',
1263             'third_party/xdg_mime/xdgmimeicon.c',
1264             'third_party/xdg_mime/xdgmimeicon.h',
1265             'third_party/xdg_mime/xdgmimeint.c',
1266             'third_party/xdg_mime/xdgmimeint.h',
1267             'third_party/xdg_mime/xdgmimemagic.c',
1268             'third_party/xdg_mime/xdgmimemagic.h',
1269             'third_party/xdg_mime/xdgmimeparent.c',
1270             'third_party/xdg_mime/xdgmimeparent.h',
1271           ],
1272           'includes': [
1273             '../build/android/increase_size_for_speed.gypi',
1274           ],
1275         },
1276       ],
1277     }],
1278     ['OS == "android"', {
1279       'targets': [
1280         {
1281           # GN: //base:base_jni_headers
1282           'target_name': 'base_jni_headers',
1283           'type': 'none',
1284           'sources': [
1285             'android/java/src/org/chromium/base/ApplicationStatus.java',
1286             'android/java/src/org/chromium/base/BuildInfo.java',
1287             'android/java/src/org/chromium/base/CommandLine.java',
1288             'android/java/src/org/chromium/base/ContentUriUtils.java',
1289             'android/java/src/org/chromium/base/CpuFeatures.java',
1290             'android/java/src/org/chromium/base/EventLog.java',
1291             'android/java/src/org/chromium/base/FieldTrialList.java',
1292             'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1293             'android/java/src/org/chromium/base/JNIUtils.java',
1294             'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
1295             'android/java/src/org/chromium/base/LocaleUtils.java',
1296             'android/java/src/org/chromium/base/MemoryPressureListener.java',
1297             'android/java/src/org/chromium/base/JavaHandlerThread.java',
1298             'android/java/src/org/chromium/base/PathService.java',
1299             'android/java/src/org/chromium/base/PathUtils.java',
1300             'android/java/src/org/chromium/base/PowerMonitor.java',
1301             'android/java/src/org/chromium/base/SystemMessageHandler.java',
1302             'android/java/src/org/chromium/base/SysUtils.java',
1303             'android/java/src/org/chromium/base/ThreadUtils.java',
1304             'android/java/src/org/chromium/base/TraceEvent.java',
1305           ],
1306           'variables': {
1307             'jni_gen_package': 'base',
1308           },
1309           'includes': [ '../build/jni_generator.gypi' ],
1310         },
1311         {
1312           # TODO(GN)
1313           'target_name': 'base_unittests_jni_headers',
1314           'type': 'none',
1315           'sources': [
1316             'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1317           ],
1318           'variables': {
1319             'jni_gen_package': 'base',
1320           },
1321           'includes': [ '../build/jni_generator.gypi' ],
1322         },
1323         {
1324           # GN: //base:base_native_libraries_gen
1325           'target_name': 'base_native_libraries_gen',
1326           'type': 'none',
1327           'sources': [
1328             'android/java/templates/NativeLibraries.template',
1329           ],
1330           'variables': {
1331             'package_name': 'org/chromium/base/library_loader',
1332             'template_deps': [],
1333           },
1334           'includes': [ '../build/android/java_cpp_template.gypi' ],
1335         },
1336         {
1337           # GN: //base:base_java
1338           'target_name': 'base_java',
1339           'type': 'none',
1340           'variables': {
1341             'java_in_dir': '../base/android/java',
1342             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
1343           },
1344           'dependencies': [
1345             'base_java_application_state',
1346             'base_java_memory_pressure_level',
1347             'base_native_libraries_gen',
1348           ],
1349           'includes': [ '../build/java.gypi' ],
1350           'conditions': [
1351             ['android_webview_build==0', {
1352               'dependencies': [
1353                 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1354               ],
1355             }]
1356           ],
1357         },
1358         {
1359           # GN: //base:base_java_unittest_support
1360           'target_name': 'base_java_unittest_support',
1361           'type': 'none',
1362           'dependencies': [
1363             'base_java',
1364           ],
1365           'variables': {
1366             'java_in_dir': '../base/test/android/java',
1367           },
1368           'includes': [ '../build/java.gypi' ],
1369         },
1370         {
1371           # GN: //base:base_android_java_enums_srcjar
1372           'target_name': 'base_java_application_state',
1373           'type': 'none',
1374           'variables': {
1375             'source_file': 'android/application_status_listener.h',
1376           },
1377           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1378         },
1379         {
1380           # GN: //base:base_android_java_enums_srcjar
1381           'target_name': 'base_java_memory_pressure_level',
1382           'type': 'none',
1383           'variables': {
1384             'source_file': 'memory/memory_pressure_listener.h',
1385           },
1386           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1387         },
1388         {
1389           # GN: //base:base_java_test_support
1390           'target_name': 'base_java_test_support',
1391           'type': 'none',
1392           'dependencies': [
1393             'base_java',
1394           ],
1395           'variables': {
1396             'java_in_dir': '../base/test/android/javatests',
1397           },
1398           'includes': [ '../build/java.gypi' ],
1399         },
1400         {
1401           # GN: //base:base_javatests
1402           'target_name': 'base_javatests',
1403           'type': 'none',
1404           'dependencies': [
1405             'base_java',
1406             'base_java_test_support',
1407           ],
1408           'variables': {
1409             'java_in_dir': '../base/android/javatests',
1410           },
1411           'includes': [ '../build/java.gypi' ],
1412         },
1413         {
1414           # GN: //base/android/linker:chromium_android_linker
1415           'target_name': 'chromium_android_linker',
1416           'type': 'shared_library',
1417           'conditions': [
1418             # Avoid breaking the webview build because it
1419             # does not have <(android_ndk_root)/crazy_linker.gyp.
1420             # Note that webview never uses the linker anyway.
1421             ['android_webview_build == 0', {
1422               'sources': [
1423                 'android/linker/linker_jni.cc',
1424               ],
1425               # The crazy linker is never instrumented.
1426               'cflags!': [
1427                 '-finstrument-functions',
1428               ],
1429               'dependencies': [
1430                 # The NDK contains the crazy_linker here:
1431                 #   '<(android_ndk_root)/crazy_linker.gyp:crazy_linker'
1432                 # However, we use our own fork.  See bug 384700.
1433                 '../third_party/android_crazy_linker/crazy_linker.gyp:crazy_linker',
1434               ],
1435             }],
1436           ],
1437         },
1438         {
1439           # TODO(GN)
1440           'target_name': 'base_perftests_apk',
1441           'type': 'none',
1442           'dependencies': [
1443             'base_perftests',
1444           ],
1445           'variables': {
1446             'test_suite_name': 'base_perftests',
1447           },
1448           'includes': [ '../build/apk_test.gypi' ],
1449         },
1450         {
1451           # GN: //base:base_unittests_apk
1452           'target_name': 'base_unittests_apk',
1453           'type': 'none',
1454           'dependencies': [
1455             'base_java',
1456             'base_unittests',
1457           ],
1458           'variables': {
1459             'test_suite_name': 'base_unittests',
1460           },
1461           'includes': [ '../build/apk_test.gypi' ],
1462         },
1463       ],
1464     }],
1465     ['OS == "win"', {
1466       'targets': [
1467         {
1468           'target_name': 'debug_message',
1469           'type': 'executable',
1470           'sources': [
1471             'debug_message.cc',
1472           ],
1473           'msvs_settings': {
1474             'VCLinkerTool': {
1475               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1476             },
1477           },
1478         },
1479       ],
1480     }],
1481     ['test_isolation_mode != "noop"', {
1482       'targets': [
1483         {
1484           'target_name': 'base_unittests_run',
1485           'type': 'none',
1486           'dependencies': [
1487             'base_unittests',
1488           ],
1489           'includes': [
1490             '../build/isolate.gypi',
1491           ],
1492           'sources': [
1493             'base_unittests.isolate',
1494           ],
1495           'conditions': [
1496             ['use_x11 == 1', {
1497               'dependencies': [
1498                 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1499               ],
1500             }],
1501           ],
1502         },
1503       ],
1504     }],
1505   ],