Use IsOriginSecure when checking Web MIDI SYSEX capability.
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blob597cce482fa61b1b0856c3d4281aa8f96cb994d5
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     # File lists shared with GN build.
8     'chrome_common_sources': [
9       'common/all_messages.h',
10       'common/attrition_experiments.h',
11       'common/auto_start_linux.cc',
12       'common/auto_start_linux.h',
13       'common/badge_util.cc',
14       'common/badge_util.h',
15       'common/child_process_logging.h',
16       'common/child_process_logging_win.cc',
17       'common/chrome_content_client.cc',
18       'common/chrome_content_client.h',
19       'common/chrome_content_client_constants.cc',
20       'common/chrome_content_client_ios.mm',
21       'common/chrome_result_codes.h',
22       'common/chrome_utility_messages.h',
23       'common/chrome_utility_printing_messages.h',
24       'common/chrome_version_info.cc',
25       'common/chrome_version_info.h',
26       'common/chrome_version_info_android.cc',
27       'common/chrome_version_info_chromeos.cc',
28       'common/chrome_version_info_mac.mm',
29       'common/chrome_version_info_posix.cc',
30       'common/chrome_version_info_win.cc',
31       'common/cloud_print/cloud_print_cdd_conversion.cc',
32       'common/cloud_print/cloud_print_cdd_conversion.h',
33       'common/cloud_print/cloud_print_class_mac.h',
34       'common/cloud_print/cloud_print_class_mac.mm',
35       'common/cloud_print/cloud_print_constants.cc',
36       'common/cloud_print/cloud_print_constants.h',
37       'common/cloud_print/cloud_print_helpers.cc',
38       'common/cloud_print/cloud_print_helpers.h',
39       'common/cloud_print/cloud_print_proxy_info.cc',
40       'common/cloud_print/cloud_print_proxy_info.h',
41       'common/common_message_generator.cc',
42       'common/common_message_generator.h',
43       'common/common_param_traits.cc',
44       'common/common_param_traits.h',
45       'common/common_param_traits_macros.h',
46       'common/content_restriction.h',
47       'common/content_settings_pattern_serializer.cc',
48       'common/content_settings_pattern_serializer.h',
49       'common/crash_keys.cc',
50       'common/crash_keys.h',
51       'common/custom_handlers/protocol_handler.cc',
52       'common/custom_handlers/protocol_handler.h',
53       'common/descriptors_android.h',
54       'common/favicon/fallback_icon_url_parser.cc',
55       'common/favicon/fallback_icon_url_parser.h',
56       'common/favicon/favicon_url_parser.cc',
57       'common/favicon/favicon_url_parser.h',
58       'common/favicon/large_icon_url_parser.cc',
59       'common/favicon/large_icon_url_parser.h',
60       'common/icon_with_badge_image_source.cc',
61       'common/icon_with_badge_image_source.h',
62       'common/ini_parser.cc',
63       'common/ini_parser.h',
64       'common/instant_types.cc',
65       'common/instant_types.h',
66       'common/localized_error.cc',
67       'common/localized_error.h',
68       'common/logging_chrome.cc',
69       'common/logging_chrome.h',
70       'common/mac/app_shim_launch.h',
71       'common/mac/app_shim_messages.h',
72       'common/mac/cfbundle_blocker.h',
73       'common/mac/cfbundle_blocker.mm',
74       'common/mac/launchd.h',
75       'common/mac/launchd.mm',
76       'common/mac/objc_zombie.h',
77       'common/mac/objc_zombie.mm',
78       'common/media/webrtc_logging_message_data.cc',
79       'common/media/webrtc_logging_message_data.h',
80       'common/media/webrtc_logging_messages.h',
81       'common/media_galleries/metadata_types.h',
82       'common/metrics/version_utils.cc',
83       'common/metrics/version_utils.h',
84       'common/multi_process_lock.h',
85       'common/multi_process_lock_linux.cc',
86       'common/multi_process_lock_mac.cc',
87       'common/multi_process_lock_win.cc',
88       'common/origin_util.cc',
89       'common/origin_util.h',
90       'common/omnibox_focus_state.h',
91       'common/partial_circular_buffer.cc',
92       'common/partial_circular_buffer.h',
93       'common/pref_names_util.cc',
94       'common/pref_names_util.h',
95       'common/prerender_types.h',
96       'common/profiling.cc',
97       'common/profiling.h',
98       'common/ref_counted_util.h',
99       'common/render_messages.cc',
100       'common/render_messages.h',
101       'common/safe_browsing/safebrowsing_messages.h',
102       'common/search_provider.h',
103       'common/search_types.h',
104       'common/search_urls.cc',
105       'common/search_urls.h',
106       'common/spellcheck_common.cc',
107       'common/spellcheck_common.h',
108       'common/spellcheck_marker.h',
109       'common/spellcheck_messages.h',
110       'common/spellcheck_result.h',
111       'common/switch_utils.cc',
112       'common/switch_utils.h',
113       'common/tts_messages.h',
114       'common/tts_utterance_request.cc',
115       'common/tts_utterance_request.h',
116       'common/url_constants.cc',
117       'common/url_constants.h',
118       'common/v8_breakpad_support_win.cc',
119       'common/v8_breakpad_support_win.h',
120       'common/variations/experiment_labels.cc',
121       'common/variations/experiment_labels.h',
122       'common/variations/variations_util.cc',
123       'common/variations/variations_util.h',
124       'common/web_application_info.cc',
125       'common/web_application_info.h',
126       'common/worker_thread_ticker.cc',
127       'common/worker_thread_ticker.h',
128     ],
129     'chrome_common_extensions_sources': [
130       'common/extensions/api/commands/commands_handler.cc',
131       'common/extensions/api/commands/commands_handler.h',
132       'common/extensions/api/extension_action/action_info.cc',
133       'common/extensions/api/extension_action/action_info.h',
134       'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
135       'common/extensions/api/file_browser_handlers/file_browser_handler.h',
136       'common/extensions/api/input_ime/input_components_handler.cc',
137       'common/extensions/api/input_ime/input_components_handler.h',
138       'common/extensions/api/notifications/notification_style.cc',
139       'common/extensions/api/notifications/notification_style.h',
140       'common/extensions/api/omnibox/omnibox_handler.cc',
141       'common/extensions/api/omnibox/omnibox_handler.h',
142       'common/extensions/api/plugins/plugins_handler.cc',
143       'common/extensions/api/plugins/plugins_handler.h',
144       'common/extensions/api/speech/tts_engine_manifest_handler.cc',
145       'common/extensions/api/speech/tts_engine_manifest_handler.h',
146       'common/extensions/api/spellcheck/spellcheck_handler.cc',
147       'common/extensions/api/spellcheck/spellcheck_handler.h',
148       'common/extensions/api/storage/storage_schema_manifest_handler.cc',
149       'common/extensions/api/storage/storage_schema_manifest_handler.h',
150       'common/extensions/api/supervised_user_private/supervised_user_handler.cc',
151       'common/extensions/api/supervised_user_private/supervised_user_handler.h',
152       'common/extensions/api/system_indicator/system_indicator_handler.cc',
153       'common/extensions/api/system_indicator/system_indicator_handler.h',
154       'common/extensions/api/url_handlers/url_handlers_parser.cc',
155       'common/extensions/api/url_handlers/url_handlers_parser.h',
156       'common/extensions/api/webstore/webstore_api_constants.cc',
157       'common/extensions/api/webstore/webstore_api_constants.h',
158       'common/extensions/chrome_extension_messages.h',
159       'common/extensions/chrome_extensions_client.cc',
160       'common/extensions/chrome_extensions_client.h',
161       'common/extensions/chrome_manifest_handlers.cc',
162       'common/extensions/chrome_manifest_handlers.h',
163       'common/extensions/chrome_manifest_url_handlers.cc',
164       'common/extensions/chrome_manifest_url_handlers.h',
165       'common/extensions/chrome_utility_extensions_messages.h',
166       'common/extensions/command.cc',
167       'common/extensions/command.h',
168       'common/extensions/extension_constants.cc',
169       'common/extensions/extension_constants.h',
170       'common/extensions/extension_metrics.cc',
171       'common/extensions/extension_metrics.h',
172       'common/extensions/extension_process_policy.cc',
173       'common/extensions/extension_process_policy.h',
174       'common/extensions/features/chrome_channel_feature_filter.cc',
175       'common/extensions/features/chrome_channel_feature_filter.h',
176       'common/extensions/features/feature_channel.cc',
177       'common/extensions/features/feature_channel.h',
178       'common/extensions/image_writer/image_writer_util_mac.cc',
179       'common/extensions/image_writer/image_writer_util_mac.h',
180       'common/extensions/manifest_handlers/app_icon_color_info.cc',
181       'common/extensions/manifest_handlers/app_icon_color_info.h',
182       'common/extensions/manifest_handlers/app_isolation_info.cc',
183       'common/extensions/manifest_handlers/app_isolation_info.h',
184       'common/extensions/manifest_handlers/app_launch_info.cc',
185       'common/extensions/manifest_handlers/app_launch_info.h',
186       'common/extensions/manifest_handlers/automation.cc',
187       'common/extensions/manifest_handlers/automation.h',
188       'common/extensions/manifest_handlers/content_scripts_handler.cc',
189       'common/extensions/manifest_handlers/content_scripts_handler.h',
190       'common/extensions/manifest_handlers/copresence_manifest.cc',
191       'common/extensions/manifest_handlers/copresence_manifest.h',
192       'common/extensions/manifest_handlers/extension_action_handler.cc',
193       'common/extensions/manifest_handlers/extension_action_handler.h',
194       'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
195       'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
196       'common/extensions/manifest_handlers/settings_overrides_handler.cc',
197       'common/extensions/manifest_handlers/settings_overrides_handler.h',
198       'common/extensions/manifest_handlers/theme_handler.cc',
199       'common/extensions/manifest_handlers/theme_handler.h',
200       'common/extensions/manifest_handlers/ui_overrides_handler.cc',
201       'common/extensions/manifest_handlers/ui_overrides_handler.h',
202       'common/extensions/permissions/chrome_api_permissions.cc',
203       'common/extensions/permissions/chrome_api_permissions.h',
204       'common/extensions/permissions/chrome_permission_message_provider.cc',
205       'common/extensions/permissions/chrome_permission_message_provider.h',
206       'common/extensions/permissions/chrome_permission_message_rules.cc',
207       'common/extensions/permissions/chrome_permission_message_rules.h',
208       'common/extensions/sync_helper.cc',
209       'common/extensions/sync_helper.h',
210     ],
211     'chrome_common_full_safe_browsing_sources': [
212       'common/safe_browsing/binary_feature_extractor.cc',
213       'common/safe_browsing/binary_feature_extractor.h',
214       'common/safe_browsing/binary_feature_extractor_posix.cc',
215       'common/safe_browsing/binary_feature_extractor_win.cc',
216       'common/safe_browsing/download_protection_util.cc',
217       'common/safe_browsing/download_protection_util.h',
218       'common/safe_browsing/ipc_protobuf_message_macros.h',
219       'common/safe_browsing/ipc_protobuf_message_null_macros.h',
220       'common/safe_browsing/pe_image_reader_win.cc',
221       'common/safe_browsing/pe_image_reader_win.h',
222       'common/safe_browsing/protobuf_message_log_macros.h',
223       'common/safe_browsing/protobuf_message_param_traits.h',
224       'common/safe_browsing/protobuf_message_read_macros.h',
225       'common/safe_browsing/protobuf_message_write_macros.h',
226       'common/safe_browsing/zip_analyzer.cc',
227       'common/safe_browsing/zip_analyzer.h',
228       'common/safe_browsing/zip_analyzer_results.cc',
229       'common/safe_browsing/zip_analyzer_results.h',
230     ],
231     'chrome_common_importer_sources': [
232       'common/importer/firefox_importer_utils.cc',
233       'common/importer/firefox_importer_utils.h',
234       'common/importer/firefox_importer_utils_linux.cc',
235       'common/importer/firefox_importer_utils_mac.mm',
236       'common/importer/firefox_importer_utils_win.cc',
237       'common/importer/ie_importer_test_registry_overrider_win.cc',
238       'common/importer/ie_importer_test_registry_overrider_win.h',
239       'common/importer/ie_importer_utils_win.cc',
240       'common/importer/ie_importer_utils_win.h',
241       'common/importer/imported_bookmark_entry.cc',
242       'common/importer/imported_bookmark_entry.h',
243       'common/importer/importer_autofill_form_data_entry.cc',
244       'common/importer/importer_autofill_form_data_entry.h',
245       'common/importer/importer_bridge.cc',
246       'common/importer/importer_bridge.h',
247       'common/importer/importer_data_types.cc',
248       'common/importer/importer_data_types.h',
249       'common/importer/importer_type.h',
250       'common/importer/importer_url_row.cc',
251       'common/importer/importer_url_row.h',
252       'common/importer/profile_import_process_messages.cc',
253       'common/importer/profile_import_process_messages.h',
254       'common/importer/profile_import_process_param_traits_macros.h',
255       'common/importer/safari_importer_utils.h',
256       'common/importer/safari_importer_utils.mm',
257     ],
258     'chrome_common_ipc_fuzzer_sources': [
259       'common/external_ipc_dumper.h',
260       'common/external_ipc_dumper.cc',
261     ],
262     'chrome_common_service_process_sources': [
263       'common/service_messages.h',
264       'common/service_process_util.cc',
265       'common/service_process_util.h',
266       'common/service_process_util_linux.cc',
267       'common/service_process_util_mac.mm',
268       'common/service_process_util_posix.cc',
269       'common/service_process_util_posix.h',
270       'common/service_process_util_win.cc',
271     ],
272     'chrome_common_win_mac_sources': [
273       'common/media_galleries/itunes_library.cc',
274       'common/media_galleries/itunes_library.h',
275       'common/media_galleries/picasa_types.cc',
276       'common/media_galleries/picasa_types.h',
277       'common/media_galleries/pmp_constants.h',
278     ],
279     'chrome_common_networking_private_sources_openssl' : [
280       'common/extensions/api/networking_private/networking_private_crypto.cc',
281       'common/extensions/api/networking_private/networking_private_crypto.h',
282       'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
283     ],
284     'chrome_common_networking_private_sources_nss' : [
285       'common/extensions/api/networking_private/networking_private_crypto.cc',
286       'common/extensions/api/networking_private/networking_private_crypto.h',
287       'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
288     ],
290     'chrome_common_mac_sources': [
291       'common/media_galleries/iphoto_library.cc',
292       'common/media_galleries/iphoto_library.h',
293     ]
294   },
295   'targets': [
296     {
297       # GN: //chrome/common:common
298       'target_name': 'common',
299       'type': 'static_library',
300       'variables': {
301         'chrome_common_target': 1,
302         'enable_wexit_time_destructors': 1,
303       },
304       'include_dirs': [
305           '..',
306           '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_content_client.cc.
307         ],
308       'direct_dependent_settings': {
309         'include_dirs': [
310           '..',
311         ],
312       },
313       'dependencies': [
314         # TODO(gregoryd): chrome_resources and chrome_strings could be
315         #  shared with the 64-bit target, but it does not work due to a gyp
316         # issue.
317         'common_net',
318         'common_version',
319         'installer_util',
320         'safe_browsing_proto',
321         '<(DEPTH)/base/base.gyp:base',
322         '<(DEPTH)/base/base.gyp:base_i18n',
323         '<(DEPTH)/base/base.gyp:base_prefs',
324         '<(DEPTH)/base/base.gyp:base_static',
325         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
326         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
327         '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
328         '<(DEPTH)/chrome/common_constants.gyp:common_constants',
329         '<(DEPTH)/components/components.gyp:cloud_devices_common',
330         '<(DEPTH)/components/components.gyp:component_updater',
331         '<(DEPTH)/components/components.gyp:content_settings_core_common',
332         '<(DEPTH)/components/components.gyp:favicon_base',
333         '<(DEPTH)/components/components.gyp:json_schema',
334         '<(DEPTH)/components/components.gyp:metrics',
335         '<(DEPTH)/components/components.gyp:policy_component_common',
336         '<(DEPTH)/components/components.gyp:translate_core_common',
337         '<(DEPTH)/components/components.gyp:variations',
338         '<(DEPTH)/content/content.gyp:content_common',
339         '<(DEPTH)/crypto/crypto.gyp:crypto',
340         '<(DEPTH)/net/net.gyp:net',
341         '<(DEPTH)/skia/skia.gyp:skia',
342         '<(DEPTH)/skia/skia.gyp:skia_library',
343         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
344         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
345         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
346         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
347         '<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
348         '<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
349         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
350         '<(DEPTH)/url/url.gyp:url_lib',
351       ],
352       'sources': [
353         '<@(chrome_common_sources)'
354       ],
355       'conditions': [
356         ['enable_extensions==1', {
357           'sources': [ '<@(chrome_common_extensions_sources)' ],
358           'dependencies': [
359             '<(DEPTH)/device/usb/usb.gyp:device_usb',
360             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
361             '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
362             '<(DEPTH)/extensions/extensions.gyp:extensions_common',
363             '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
364             '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
365             '<(DEPTH)/media/cast/cast.gyp:cast_net',
366           ],
367           'export_dependent_settings': [
368             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
369           ],
370         }],
371         ['OS=="win" or OS=="mac"', {
372           'sources': [ '<@(chrome_common_win_mac_sources)' ],
373         }],
374         ['(OS=="win" or OS=="mac" or chromeos==1) and use_openssl==1', {
375           'sources': [ '<@(chrome_common_networking_private_sources_openssl)' ],
376           'dependencies': [
377             '../third_party/boringssl/boringssl.gyp:boringssl',
378           ],
379         }],
380         ['(OS=="win" or OS=="mac" or chromeos==1) and use_openssl!=1', {
381           'sources': [ '<@(chrome_common_networking_private_sources_nss)' ],
382         }],
383         ['OS=="mac"', {
384           'sources': [ '<@(chrome_common_mac_sources)' ],
385           'dependencies': [ 'app_mode_app_support' ],
386         }],
387         ['OS != "ios"', {
388           'dependencies': [
389             '<(DEPTH)/components/components.gyp:autofill_core_common',
390             '<(DEPTH)/components/components.gyp:autofill_content_common',
391             '<(DEPTH)/components/components.gyp:password_manager_core_common',
392             '<(DEPTH)/components/components.gyp:password_manager_content_common',
393             '<(DEPTH)/components/components.gyp:signin_core_common',
394             '<(DEPTH)/components/components.gyp:translate_content_common',
395             '<(DEPTH)/components/components.gyp:visitedlink_common',
396             '<(DEPTH)/extensions/extensions.gyp:extensions_common_constants',
397             '<(DEPTH)/ipc/ipc.gyp:ipc',
398             '<(DEPTH)/third_party/re2/re2.gyp:re2',
399             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
400           ],
401         }, {  # OS == ios
402           'sources/': [
403             ['exclude', '^common/child_process_'],
404             ['exclude', '^common/chrome_content_client\\.cc$'],
405             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
406             ['exclude', '^common/common_message_generator\\.cc$'],
407             ['exclude', '^common/common_param_traits'],
408             ['exclude', '^common/custom_handlers/'],
409             ['exclude', '^common/extensions/'],
410             ['exclude', '^common/logging_chrome\\.'],
411             ['exclude', '^common/media_galleries/'],
412             ['exclude', '^common/multi_process_'],
413             ['exclude', '^common/profiling\\.'],
414             ['exclude', '^common/spellcheck_'],
415             ['exclude', '^common/validation_message_'],
416             ['exclude', '^common/web_apps\\.'],
417             # TODO(ios): Include files here as they are made to work; once
418             # everything is online, remove everything below here and just
419             # use the exclusions above.
420             ['exclude', '\\.(cc|mm)$'],
421             ['include', '_ios\\.(cc|mm)$'],
422             ['include', '(^|/)ios/'],
423             ['include', '^common/chrome_version_info\\.cc$'],
424             ['include', '^common/translate'],
425             ['include', '^common/zip'],
426           ],
427           'include_dirs': [
428             '<(DEPTH)/breakpad/src',
429           ],
430         }],
431         ['disable_nacl==0', {
432           'dependencies': [
433             '<(DEPTH)/components/nacl.gyp:nacl_common',
434           ],
435         }],
436         ['enable_ipc_fuzzer==1', {
437           'sources': [ '<@(chrome_common_ipc_fuzzer_sources)' ],
438         }],
439         ['enable_plugins==1', {
440           'dependencies': [
441             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
442           ],
443           'sources': [
444             'common/pepper_flash.cc',
445             'common/pepper_flash.h',
446             'common/ppapi_utils.cc',
447             'common/ppapi_utils.h',
448           ],
449         }],
450         ['enable_plugins==1 and enable_extensions==1', {
451           'sources': [
452             'common/pepper_permission_util.cc',
453             'common/pepper_permission_util.h',
454           ],
455         }],
456         ['enable_basic_printing==1 or enable_print_preview==1', {
457           'dependencies': [
458             '<(DEPTH)/components/components.gyp:printing_common',
459             '<(DEPTH)/printing/printing.gyp:printing',
460           ],
461         }],
462         ['enable_print_preview==1', {
463           'sources': [ '<@(chrome_common_service_process_sources)' ],
464         }],
465         ['enable_service_discovery==1', {
466           'sources' : [
467             'common/local_discovery/service_discovery_client.cc',
468             'common/local_discovery/service_discovery_client.h',
469            ]
470         }],
471         ['enable_mdns==1', {
472           'sources' : [
473             'common/local_discovery/service_discovery_client_impl.cc',
474             'common/local_discovery/service_discovery_client_impl.h',
475           ]
476         }],
477         ['OS=="android"', {
478           'sources!': [
479             'common/badge_util.cc',
480             'common/chrome_version_info_posix.cc',
481             'common/extensions/api/spellcheck/spellcheck_handler.cc',
482             'common/extensions/manifest_handlers/extension_action_handler.cc',
483             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
484             'common/icon_with_badge_image_source.cc',
485             'common/media_galleries/metadata_types.h',
486             'common/net/url_util.cc',
487             'common/spellcheck_common.cc',
488           ],
489         }, {
490           # Non-Android.
491           'sources': [ '<@(chrome_common_importer_sources)' ]
492         }],
493         ['OS=="win"', {
494           'include_dirs': [
495             '<(DEPTH)/breakpad/src',
496             '<(DEPTH)/third_party/wtl/include',
497           ],
498           'dependencies': [
499             '<(DEPTH)/components/components.gyp:dom_distiller_core',  # Needed by chrome_content_client.cc.
500           ],
501         }],
502         ['enable_mdns == 1', {
503             'sources': [
504               'common/local_discovery/local_discovery_messages.h',
505             ]
506         }],
507         ['OS=="mac"', {
508           'dependencies': [
509             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
510             '../third_party/mach_override/mach_override.gyp:mach_override',
511           ],
512           'include_dirs': [
513             '<(DEPTH)/breakpad/src',
514           ],
515           'sources!': [
516             'common/chrome_version_info_posix.cc',
517           ],
518         }],
519         ['enable_webrtc==0', {
520           'sources!': [
521             'common/media/webrtc_logging_messages.h',
522           ]
523         }],
524         ['configuration_policy==1', {
525           'dependencies': [
526             '<(DEPTH)/components/components.gyp:policy',
527           ],
528         }],
529         ['safe_browsing==1', {
530           'defines': [ 'FULL_SAFE_BROWSING' ],
531           'sources': [ '<@(chrome_common_full_safe_browsing_sources)', ],
532         }],
533         ['safe_browsing==2', {
534           'defines': [ 'MOBILE_SAFE_BROWSING' ],
535         }],
536       ],
537       'target_conditions': [
538         ['OS == "ios"', {
539           'sources/': [
540             # Pull in specific Mac files for iOS (which have been filtered out
541             # by file name rules).
542             ['include', '^common/chrome_version_info_mac\\.mm$'],
543           ],
544         }],
545       ],
546       'export_dependent_settings': [
547         '../base/base.gyp:base',
548       ],
549     },
550     {
551       # GN version: //chrome/common:version
552       'target_name': 'common_version',
553       'type': 'none',
554       'direct_dependent_settings': {
555         'include_dirs': [
556           '<(SHARED_INTERMEDIATE_DIR)',
557         ],
558       },
559       # Because generate_version generates a header, we must set the
560       # hard_dependency flag.
561       'hard_dependency': 1,
562       'actions': [
563         {
564           'action_name': 'generate_version',
565           'variables': {
566             'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
567             'version_py_path': '<(DEPTH)/build/util/version.py',
568             'version_path': 'VERSION',
569             'template_input_path': 'common/chrome_version_info_values.h.version',
570           },
571           'conditions': [
572             [ 'branding == "Chrome"', {
573               'variables': {
574                   'branding_path':
575                     'app/theme/google_chrome/BRANDING',
576               },
577             }, { # else branding!="Chrome"
578               'variables': {
579                   'branding_path':
580                     'app/theme/chromium/BRANDING',
581               },
582             }],
583           ],
584           'inputs': [
585             '<(template_input_path)',
586             '<(version_path)',
587             '<(branding_path)',
588             '<(lastchange_path)',
589           ],
590           'outputs': [
591             '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_values.h',
592           ],
593           'action': [
594             'python',
595             '<(version_py_path)',
596             '-f', '<(version_path)',
597             '-f', '<(branding_path)',
598             '-f', '<(lastchange_path)',
599             '<(template_input_path)',
600             '<@(_outputs)',
601           ],
602           'message': 'Generating version information',
603         },
604       ],
605     },
606     {
607       # GN version: //chrome/common/net
608       'target_name': 'common_net',
609       'type': 'static_library',
610       'sources': [
611         'common/net/net_resource_provider.cc',
612         'common/net/net_resource_provider.h',
613         'common/net/url_util.cc',
614         'common/net/url_util.h',
615         'common/net/x509_certificate_model.cc',
616         'common/net/x509_certificate_model.h',
617         'common/net/x509_certificate_model_nss.cc',
618         'common/net/x509_certificate_model_openssl.cc',
619       ],
620       'dependencies': [
621         '<(DEPTH)/base/base.gyp:base',
622         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
623         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
624         '<(DEPTH)/components/components.gyp:network_hints_common',
625         '<(DEPTH)/components/components.gyp:error_page_common',
626         '<(DEPTH)/crypto/crypto.gyp:crypto',
627         '<(DEPTH)/net/net.gyp:net_resources',
628         '<(DEPTH)/net/net.gyp:net',
629         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
630         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
631         '<(DEPTH)/ui/base/ui_base.gyp:ui_base',
632       ],
633       'conditions': [
634         ['OS != "ios"', {
635           'dependencies': [
636             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
637           ],
638         }, {  # OS == ios
639           'sources!': [
640             'common/net/net_resource_provider.cc',
641             'common/net/x509_certificate_model.cc',
642           ],
643         }],
644         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
645             'dependencies': [
646               '../build/linux/system.gyp:ssl',
647             ],
648           },
649         ],
650         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
651             'sources!': [
652               'common/net/x509_certificate_model_nss.cc',
653               'common/net/x509_certificate_model_openssl.cc',
654             ],
655           },
656         ],
657         ['OS == "android"', {
658             'dependencies': [
659               '../third_party/boringssl/boringssl.gyp:boringssl',
660             ],
661             'sources!': [
662               'common/net/x509_certificate_model.cc',
663               'common/net/x509_certificate_model_openssl.cc',
664             ],
665         }],
666         ['use_openssl==1', {
667             'sources!': [
668               'common/net/x509_certificate_model_nss.cc',
669             ],
670             'dependencies': [
671               '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
672             ],
673           },
674           {  # else !use_openssl: remove the unneeded files
675             'sources!': [
676               'common/net/x509_certificate_model_openssl.cc',
677             ],
678           },
679         ],
680         ['OS=="win"', {
681             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
682             'msvs_disabled_warnings': [4267, ],
683           },
684         ],
685       ],
686     },
687     {
688       # Protobuf compiler / generator for the safebrowsing client
689       # model proto and the client-side detection (csd) request
690       # protocol buffer.
692       # GN version: //chrome/common/safe_browsing:proto
693       'target_name': 'safe_browsing_proto',
694       'type': 'static_library',
695       'sources': [
696         'common/safe_browsing/client_model.proto',
697         'common/safe_browsing/crx_info.proto',
698         'common/safe_browsing/csd.proto'
699       ],
700       'variables': {
701         'proto_in_dir': 'common/safe_browsing',
702         'proto_out_dir': 'chrome/common/safe_browsing',
703       },
704       'includes': [ '../build/protoc.gypi' ],
705     },
706   ],