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