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