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