Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blob1be2c43f9490365c5cc0e07689dfaf1ed4e6c004
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/pref_names_util.cc',
153       'common/pref_names_util.h',
154       'common/prerender_types.h',
155       'common/print_messages.cc',
156       'common/print_messages.h',
157       'common/profiling.cc',
158       'common/profiling.h',
159       'common/ref_counted_util.h',
160       'common/render_messages.cc',
161       'common/render_messages.h',
162       'common/safe_browsing/safebrowsing_messages.h',
163       'common/search_provider.h',
164       'common/search_types.h',
165       'common/search_urls.cc',
166       'common/search_urls.h',
167       'common/spellcheck_common.cc',
168       'common/spellcheck_common.h',
169       'common/spellcheck_marker.h',
170       'common/spellcheck_messages.h',
171       'common/spellcheck_result.h',
172       'common/switch_utils.cc',
173       'common/switch_utils.h',
174       'common/terminate_on_heap_corruption_experiment_win.cc',
175       'common/terminate_on_heap_corruption_experiment_win.h',
176       'common/tts_messages.h',
177       'common/tts_utterance_request.cc',
178       'common/tts_utterance_request.h',
179       'common/url_constants.cc',
180       'common/url_constants.h',
181       'common/variations/experiment_labels.cc',
182       'common/variations/experiment_labels.h',
183       'common/variations/uniformity_field_trials.cc',
184       'common/variations/uniformity_field_trials.h',
185       'common/variations/variations_util.cc',
186       'common/variations/variations_util.h',
187       'common/web_application_info.cc',
188       'common/web_application_info.h',
189       'common/worker_thread_ticker.cc',
190       'common/worker_thread_ticker.h',
191     ],
192     'chrome_common_extensions_sources': [
193       'common/extensions/api/bluetooth/bluetooth_manifest_data.cc',
194       'common/extensions/api/bluetooth/bluetooth_manifest_data.h',
195       'common/extensions/api/bluetooth/bluetooth_manifest_handler.cc',
196       'common/extensions/api/bluetooth/bluetooth_manifest_handler.h',
197       'common/extensions/api/bluetooth/bluetooth_manifest_permission.cc',
198       'common/extensions/api/bluetooth/bluetooth_manifest_permission.h',
199       'common/extensions/api/commands/commands_handler.cc',
200       'common/extensions/api/commands/commands_handler.h',
201       'common/extensions/api/extension_action/browser_action_handler.cc',
202       'common/extensions/api/extension_action/browser_action_handler.h',
203       'common/extensions/api/extension_action/page_action_handler.cc',
204       'common/extensions/api/extension_action/page_action_handler.h',
205       'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
206       'common/extensions/api/file_browser_handlers/file_browser_handler.h',
207       'common/extensions/api/input_ime/input_components_handler.cc',
208       'common/extensions/api/input_ime/input_components_handler.h',
209       'common/extensions/api/notifications/notification_style.cc',
210       'common/extensions/api/notifications/notification_style.h',
211       'common/extensions/api/omnibox/omnibox_handler.cc',
212       'common/extensions/api/omnibox/omnibox_handler.h',
213       'common/extensions/api/speech/tts_engine_manifest_handler.cc',
214       'common/extensions/api/speech/tts_engine_manifest_handler.h',
215       'common/extensions/api/spellcheck/spellcheck_handler.cc',
216       'common/extensions/api/spellcheck/spellcheck_handler.h',
217       'common/extensions/api/system_indicator/system_indicator_handler.cc',
218       'common/extensions/api/system_indicator/system_indicator_handler.h',
219       'common/extensions/api/url_handlers/url_handlers_parser.cc',
220       'common/extensions/api/url_handlers/url_handlers_parser.h',
221       'common/extensions/api/webstore/webstore_api_constants.cc',
222       'common/extensions/api/webstore/webstore_api_constants.h',
223     ],
224     'chrome_common_full_safe_browsing_sources': [
225       'common/safe_browsing/download_protection_util.cc',
226       'common/safe_browsing/download_protection_util.h',
227       'common/safe_browsing/zip_analyzer.cc',
228       'common/safe_browsing/zip_analyzer.h',
229     ],
230     'chrome_common_importer_sources': [
231       'common/importer/firefox_importer_utils.cc',
232       'common/importer/firefox_importer_utils.h',
233       'common/importer/firefox_importer_utils_linux.cc',
234       'common/importer/firefox_importer_utils_mac.mm',
235       'common/importer/firefox_importer_utils_win.cc',
236       'common/importer/ie_importer_test_registry_overrider_win.cc',
237       'common/importer/ie_importer_test_registry_overrider_win.h',
238       'common/importer/ie_importer_utils_win.cc',
239       'common/importer/ie_importer_utils_win.h',
240       'common/importer/imported_bookmark_entry.cc',
241       'common/importer/imported_bookmark_entry.h',
242       'common/importer/imported_favicon_usage.cc',
243       'common/importer/imported_favicon_usage.h',
244       'common/importer/importer_bridge.cc',
245       'common/importer/importer_bridge.h',
246       'common/importer/importer_data_types.cc',
247       'common/importer/importer_data_types.h',
248       'common/importer/importer_type.h',
249       'common/importer/importer_url_row.cc',
250       'common/importer/importer_url_row.h',
251       'common/importer/profile_import_process_messages.cc',
252       'common/importer/profile_import_process_messages.h',
253       'common/importer/safari_importer_utils.h',
254       'common/importer/safari_importer_utils.mm',
255     ],
256     'chrome_common_service_process_sources': [
257       'common/service_messages.h',
258       'common/service_process_util.cc',
259       'common/service_process_util.h',
260       'common/service_process_util_linux.cc',
261       'common/service_process_util_mac.mm',
262       'common/service_process_util_posix.cc',
263       'common/service_process_util_posix.h',
264       'common/service_process_util_win.cc',
265     ],
266     'chrome_common_win_mac_sources': [
267       'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
268       'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
269       'common/extensions/api/networking_private/networking_private_crypto.cc',
270       'common/extensions/api/networking_private/networking_private_crypto.h',
271       'common/media_galleries/itunes_library.cc',
272       'common/media_galleries/itunes_library.h',
273       'common/media_galleries/picasa_types.cc',
274       'common/media_galleries/picasa_types.h',
275       'common/media_galleries/pmp_constants.h',
276     ],
277     'chrome_common_mac_sources': [
278       'common/media_galleries/iphoto_library.cc',
279       'common/media_galleries/iphoto_library.h',
280     ]
281   },
282   'targets': [
283     {
284       'target_name': 'common',
285       'type': 'static_library',
286       'variables': {
287         'chrome_common_target': 1,
288         'enable_wexit_time_destructors': 1,
289       },
290       'include_dirs': [
291           '..',
292           '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_content_client.cc.
293         ],
294       'direct_dependent_settings': {
295         'include_dirs': [
296           '..',
297         ],
298       },
299       'dependencies': [
300         # TODO(gregoryd): chrome_resources and chrome_strings could be
301         #  shared with the 64-bit target, but it does not work due to a gyp
302         # issue.
303         'common_net',
304         'common_version',
305         'installer_util',
306         'safe_browsing_proto',
307         '<(DEPTH)/base/base.gyp:base',
308         '<(DEPTH)/base/base.gyp:base_i18n',
309         '<(DEPTH)/base/base.gyp:base_prefs',
310         '<(DEPTH)/base/base.gyp:base_static',
311         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
312         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
313         '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
314         '<(DEPTH)/chrome/common_constants.gyp:common_constants',
315         '<(DEPTH)/components/components.gyp:cloud_devices_common',
316         '<(DEPTH)/components/components.gyp:component_updater',
317         '<(DEPTH)/components/components.gyp:content_settings_core_common',
318         '<(DEPTH)/components/components.gyp:json_schema',
319         '<(DEPTH)/components/components.gyp:metrics',
320         '<(DEPTH)/components/components.gyp:policy_component_common',
321         '<(DEPTH)/components/components.gyp:translate_core_common',
322         '<(DEPTH)/components/components.gyp:variations',
323         '<(DEPTH)/content/content.gyp:content_common',
324         '<(DEPTH)/crypto/crypto.gyp:crypto',
325         '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
326         '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
327         '<(DEPTH)/media/cast/cast.gyp:cast_net',
328         '<(DEPTH)/net/net.gyp:net',
329         '<(DEPTH)/skia/skia.gyp:skia',
330         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
331         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
332         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
333         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
334         '<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
335         '<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
336         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
337         '<(DEPTH)/url/url.gyp:url_lib',
338       ],
339       'sources': [
340         '<@(chrome_common_sources)'
341       ],
342       'conditions': [
343         ['enable_extensions==1', {
344           'sources': [ '<@(chrome_common_extensions_sources)' ],
345           'dependencies': [
346             '../device/bluetooth/bluetooth.gyp:device_bluetooth',
347             '../device/usb/usb.gyp:device_usb',
348           ],
349         }],
350         ['OS=="win" or OS=="mac"', {
351           'sources': [ '<@(chrome_common_win_mac_sources)' ],
352         }],
353         ['(OS=="win" or OS=="mac") and use_openssl==1', {
354           # networking_private_crypto_openssl.cc depends on boringssl.
355           'dependencies': [
356             '../third_party/boringssl/boringssl.gyp:boringssl',
357           ],
358         }],
359         ['OS=="mac"', {
360           'sources': [ '<@(chrome_common_mac_sources)' ],
361         }],
362         ['OS != "ios"', {
363           'dependencies': [
364             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
365             '<(DEPTH)/components/components.gyp:autofill_core_common',
366             '<(DEPTH)/components/components.gyp:autofill_content_common',
367             '<(DEPTH)/components/components.gyp:password_manager_core_common',
368             '<(DEPTH)/components/components.gyp:password_manager_content_common',
369             '<(DEPTH)/components/components.gyp:signin_core_common',
370             '<(DEPTH)/components/components.gyp:translate_content_common',
371             '<(DEPTH)/components/components.gyp:visitedlink_common',
372             '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
373             '<(DEPTH)/extensions/extensions.gyp:extensions_common',
374             '<(DEPTH)/ipc/ipc.gyp:ipc',
375             '<(DEPTH)/third_party/re2/re2.gyp:re2',
376             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
377           ],
378           'export_dependent_settings': [
379             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
380           ],
381         }, {  # OS == ios
382           'sources/': [
383             ['exclude', '^common/child_process_'],
384             ['exclude', '^common/chrome_content_client\\.cc$'],
385             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
386             ['exclude', '^common/common_message_generator\\.cc$'],
387             ['exclude', '^common/common_param_traits'],
388             ['exclude', '^common/custom_handlers/'],
389             ['exclude', '^common/extensions/'],
390             ['exclude', '^common/logging_chrome\\.'],
391             ['exclude', '^common/media_galleries/'],
392             ['exclude', '^common/multi_process_'],
393             ['exclude', '^common/profiling\\.'],
394             ['exclude', '^common/spellcheck_'],
395             ['exclude', '^common/validation_message_'],
396             ['exclude', '^common/web_apps\\.'],
397             # TODO(ios): Include files here as they are made to work; once
398             # everything is online, remove everything below here and just
399             # use the exclusions above.
400             ['exclude', '\\.(cc|mm)$'],
401             ['include', '_ios\\.(cc|mm)$'],
402             ['include', '(^|/)ios/'],
403             ['include', '^common/chrome_version_info\\.cc$'],
404             ['include', '^common/translate'],
405             ['include', '^common/zip'],
406           ],
407           'include_dirs': [
408             '<(DEPTH)/breakpad/src',
409           ],
410         }],
411         ['disable_nacl==0', {
412           'dependencies': [
413             '<(DEPTH)/components/nacl.gyp:nacl_common',
414             '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
415           ],
416         }],
417         ['enable_plugins==1', {
418           'dependencies': [
419             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
420           ],
421           'sources': [
422             'common/pepper_flash.cc',
423             'common/pepper_flash.h',
424             'common/pepper_permission_util.cc',
425             'common/pepper_permission_util.h',
426           ],
427         }],
428         ['enable_printing==0', {
429           'sources!': [
430             'common/print_messages.cc',
431             'common/print_messages.h',
432           ]
433         }, {
434           'dependencies': [
435             '<(DEPTH)/printing/printing.gyp:printing',
436           ],
437         }],
438         ['enable_printing==1', {
439           'sources': [ '<@(chrome_common_service_process_sources)' ],
440         }],
441         ['enable_service_discovery==1', {
442           'sources' : [
443             'common/local_discovery/service_discovery_client.cc',
444             'common/local_discovery/service_discovery_client.h',
445            ]
446         }],
447         ['enable_mdns==1', {
448           'sources' : [
449             'common/local_discovery/service_discovery_client_impl.cc',
450             'common/local_discovery/service_discovery_client_impl.h',
451           ]
452         }],
453         ['OS=="android"', {
454           'sources!': [
455             'common/badge_util.cc',
456             'common/chrome_version_info_posix.cc',
457             'common/extensions/api/extension_action/browser_action_handler.cc',
458             'common/extensions/api/extension_action/page_action_handler.cc',
459             'common/extensions/api/spellcheck/spellcheck_handler.cc',
460             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
461             'common/icon_with_badge_image_source.cc',
462             'common/media_galleries/metadata_types.h',
463             'common/net/url_util.cc',
464             'common/spellcheck_common.cc',
465           ],
466         }, {
467           # Non-Android.
468           'sources': [ '<@(chrome_common_importer_sources)' ]
469         }],
470         ['OS=="win"', {
471           'include_dirs': [
472             '<(DEPTH)/breakpad/src',
473             '<(DEPTH)/third_party/wtl/include',
474           ],
475           'dependencies': [
476             '<(DEPTH)/components/components.gyp:dom_distiller_core',  # Needed by chrome_content_client.cc.
477           ],
478         }],
479         ['enable_mdns == 1', {
480             'sources': [
481               'common/local_discovery/local_discovery_messages.h',
482             ]
483         }],
484         ['chromeos==1', {
485           'sources!': [
486             'common/chrome_version_info_linux.cc',
487           ],
488         }],
489         ['OS=="mac"', {
490           'dependencies': [
491             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
492             '../third_party/mach_override/mach_override.gyp:mach_override',
493           ],
494           'include_dirs': [
495             '<(DEPTH)/breakpad/src',
496           ],
497           'sources!': [
498             'common/chrome_version_info_posix.cc',
499           ],
500         }],
501         ['remoting==1', {
502           'dependencies': [
503             '../remoting/remoting.gyp:remoting_client_plugin',
504           ],
505         }],
506         ['enable_webrtc==0', {
507           'sources!': [
508             'common/media/webrtc_logging_messages.h',
509           ]
510         }],
511         ['configuration_policy==1', {
512           'dependencies': [
513             '<(DEPTH)/components/components.gyp:policy',
514           ],
515         }],
516         ['safe_browsing==1', {
517           'defines': [ 'FULL_SAFE_BROWSING' ],
518           'sources': [ '<@(chrome_common_full_safe_browsing_sources)', ],
519         }],
520         ['safe_browsing==2', {
521           'defines': [ 'MOBILE_SAFE_BROWSING' ],
522         }],
523         ['use_openssl==1', {
524            'sources!': [
525              'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
526            ],
527          },
528          {  # else !use_openssl
529            'sources!': [
530              'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
531            ],
532          },
533         ],
534       ],
535       'target_conditions': [
536         ['OS == "ios"', {
537           'sources/': [
538             # Pull in specific Mac files for iOS (which have been filtered out
539             # by file name rules).
540             ['include', '^common/chrome_version_info_mac\\.mm$'],
541           ],
542         }],
543       ],
544       'export_dependent_settings': [
545         '../base/base.gyp:base',
546       ],
547     },
548     {
549       # GN version: //chrome/common:version
550       'target_name': 'common_version',
551       'type': 'none',
552       'conditions': [
553         ['os_posix == 1 and OS != "mac" and OS != "ios"', {
554           'direct_dependent_settings': {
555             'include_dirs': [
556               '<(SHARED_INTERMEDIATE_DIR)',
557             ],
558           },
559           # Because posix_version generates a header, we must set the
560           # hard_dependency flag.
561           'hard_dependency': 1,
562           'actions': [
563             {
564               'action_name': 'posix_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_posix.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_posix.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     },
608     {
609       # GN version: //chrome/common/net
610       'target_name': 'common_net',
611       'type': 'static_library',
612       'sources': [
613         'common/net/net_error_info.cc',
614         'common/net/net_error_info.h',
615         'common/net/net_resource_provider.cc',
616         'common/net/net_resource_provider.h',
617         'common/net/predictor_common.h',
618         'common/net/url_util.cc',
619         'common/net/url_util.h',
620         'common/net/x509_certificate_model.cc',
621         'common/net/x509_certificate_model_nss.cc',
622         'common/net/x509_certificate_model_openssl.cc',
623         'common/net/x509_certificate_model.h',
624       ],
625       'dependencies': [
626         '<(DEPTH)/base/base.gyp:base',
627         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
628         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
629         '<(DEPTH)/crypto/crypto.gyp:crypto',
630         '<(DEPTH)/net/net.gyp:net_resources',
631         '<(DEPTH)/net/net.gyp:net',
632         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
633         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
634       ],
635       'conditions': [
636         ['OS != "ios"', {
637           'dependencies': [
638             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
639           ],
640         }, {  # OS == ios
641           'sources!': [
642             'common/net/net_resource_provider.cc',
643             'common/net/x509_certificate_model.cc',
644           ],
645         }],
646         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
647             'dependencies': [
648               '../build/linux/system.gyp:ssl',
649             ],
650           },
651         ],
652         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
653             'sources!': [
654               'common/net/x509_certificate_model_nss.cc',
655               'common/net/x509_certificate_model_openssl.cc',
656             ],
657           },
658         ],
659         ['OS == "android"', {
660             'dependencies': [
661               '../third_party/boringssl/boringssl.gyp:boringssl',
662             ],
663             'sources!': [
664               'common/net/x509_certificate_model.cc',
665               'common/net/x509_certificate_model_openssl.cc',
666             ],
667         }],
668         ['use_openssl==1', {
669             'sources!': [
670               'common/net/x509_certificate_model_nss.cc',
671             ],
672             'dependencies': [
673               '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
674             ],
675           },
676           {  # else !use_openssl: remove the unneeded files
677             'sources!': [
678               'common/net/x509_certificate_model_openssl.cc',
679             ],
680           },
681         ],
682         ['OS=="win"', {
683             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
684             'msvs_disabled_warnings': [4267, ],
685           },
686         ],
687       ],
688     },
689     {
690       # Protobuf compiler / generator for the safebrowsing client
691       # model proto and the client-side detection (csd) request
692       # protocol buffer.
694       # GN version: //chrome/common/safe_browsing:proto
695       'target_name': 'safe_browsing_proto',
696       'type': 'static_library',
697       'sources': [
698         'common/safe_browsing/client_model.proto',
699         'common/safe_browsing/crx_info.proto',
700         'common/safe_browsing/csd.proto'
701       ],
702       'variables': {
703         'proto_in_dir': 'common/safe_browsing',
704         'proto_out_dir': 'chrome/common/safe_browsing',
705       },
706       'includes': [ '../build/protoc.gypi' ],
707     },
708   ],