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