replace OVERRIDE and FINAL with override and final in ash/
[chromium-blink-merge.git] / chrome / chrome_common.gypi
blob4b9581f9f157c4a531d3ab1c89e92d59597127c1
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/synthesize_browser_action_handler.cc',
206       'common/extensions/manifest_handlers/synthesize_browser_action_handler.h',
207       'common/extensions/manifest_handlers/theme_handler.cc',
208       'common/extensions/manifest_handlers/theme_handler.h',
209       'common/extensions/manifest_handlers/ui_overrides_handler.cc',
210       'common/extensions/manifest_handlers/ui_overrides_handler.h',
211       'common/extensions/manifest_url_handler.cc',
212       'common/extensions/manifest_url_handler.h',
213     ],
214     'chrome_common_full_safe_browsing_sources': [
215       'common/safe_browsing/download_protection_util.cc',
216       'common/safe_browsing/download_protection_util.h',
217       'common/safe_browsing/zip_analyzer.cc',
218       'common/safe_browsing/zip_analyzer.h',
219     ],
220     'chrome_common_importer_sources': [
221       'common/importer/firefox_importer_utils.cc',
222       'common/importer/firefox_importer_utils.h',
223       'common/importer/firefox_importer_utils_linux.cc',
224       'common/importer/firefox_importer_utils_mac.mm',
225       'common/importer/firefox_importer_utils_win.cc',
226       'common/importer/ie_importer_test_registry_overrider_win.cc',
227       'common/importer/ie_importer_test_registry_overrider_win.h',
228       'common/importer/ie_importer_utils_win.cc',
229       'common/importer/ie_importer_utils_win.h',
230       'common/importer/imported_bookmark_entry.cc',
231       'common/importer/imported_bookmark_entry.h',
232       'common/importer/imported_favicon_usage.cc',
233       'common/importer/imported_favicon_usage.h',
234       'common/importer/importer_autofill_form_data_entry.cc',
235       'common/importer/importer_autofill_form_data_entry.h',
236       'common/importer/importer_bridge.cc',
237       'common/importer/importer_bridge.h',
238       'common/importer/importer_data_types.cc',
239       'common/importer/importer_data_types.h',
240       'common/importer/importer_type.h',
241       'common/importer/importer_url_row.cc',
242       'common/importer/importer_url_row.h',
243       'common/importer/profile_import_process_messages.cc',
244       'common/importer/profile_import_process_messages.h',
245       'common/importer/profile_import_process_param_traits_macros.h',
246       'common/importer/safari_importer_utils.h',
247       'common/importer/safari_importer_utils.mm',
248     ],
249     'chrome_common_service_process_sources': [
250       'common/service_messages.h',
251       'common/service_process_util.cc',
252       'common/service_process_util.h',
253       'common/service_process_util_linux.cc',
254       'common/service_process_util_mac.mm',
255       'common/service_process_util_posix.cc',
256       'common/service_process_util_posix.h',
257       'common/service_process_util_win.cc',
258     ],
259     'chrome_common_win_mac_sources': [
260       'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
261       'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
262       'common/extensions/api/networking_private/networking_private_crypto.cc',
263       'common/extensions/api/networking_private/networking_private_crypto.h',
264       'common/media_galleries/itunes_library.cc',
265       'common/media_galleries/itunes_library.h',
266       'common/media_galleries/picasa_types.cc',
267       'common/media_galleries/picasa_types.h',
268       'common/media_galleries/pmp_constants.h',
269     ],
270     'chrome_common_mac_sources': [
271       'common/media_galleries/iphoto_library.cc',
272       'common/media_galleries/iphoto_library.h',
273     ]
274   },
275   'targets': [
276     {
277       'target_name': 'common',
278       'type': 'static_library',
279       'variables': {
280         'chrome_common_target': 1,
281         'enable_wexit_time_destructors': 1,
282       },
283       'include_dirs': [
284           '..',
285           '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_content_client.cc.
286         ],
287       'direct_dependent_settings': {
288         'include_dirs': [
289           '..',
290         ],
291       },
292       'dependencies': [
293         # TODO(gregoryd): chrome_resources and chrome_strings could be
294         #  shared with the 64-bit target, but it does not work due to a gyp
295         # issue.
296         'common_net',
297         'common_version',
298         'installer_util',
299         'safe_browsing_proto',
300         '<(DEPTH)/base/base.gyp:base',
301         '<(DEPTH)/base/base.gyp:base_i18n',
302         '<(DEPTH)/base/base.gyp:base_prefs',
303         '<(DEPTH)/base/base.gyp:base_static',
304         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
305         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
306         '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
307         '<(DEPTH)/chrome/common_constants.gyp:common_constants',
308         '<(DEPTH)/components/components.gyp:cloud_devices_common',
309         '<(DEPTH)/components/components.gyp:component_updater',
310         '<(DEPTH)/components/components.gyp:content_settings_core_common',
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)/extensions/extensions_resources.gyp:extensions_resources',
319         '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
320         '<(DEPTH)/media/cast/cast.gyp:cast_net',
321         '<(DEPTH)/net/net.gyp:net',
322         '<(DEPTH)/skia/skia.gyp:skia',
323         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
324         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
325         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
326         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
327         '<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
328         '<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
329         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
330         '<(DEPTH)/url/url.gyp:url_lib',
331       ],
332       'sources': [
333         '<@(chrome_common_sources)'
334       ],
335       'conditions': [
336         ['enable_extensions==1', {
337           'sources': [ '<@(chrome_common_extensions_sources)' ],
338           'dependencies': [
339             '<(DEPTH)/device/usb/usb.gyp:device_usb',
340             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
341             '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
342           ],
343           'export_dependent_settings': [
344             '<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
345           ],
346         }],
347         ['OS=="win" or OS=="mac"', {
348           'sources': [ '<@(chrome_common_win_mac_sources)' ],
349         }],
350         ['(OS=="win" or OS=="mac") and use_openssl==1', {
351           # networking_private_crypto_openssl.cc depends on boringssl.
352           'dependencies': [
353             '../third_party/boringssl/boringssl.gyp:boringssl',
354           ],
355         }],
356         ['OS=="mac"', {
357           'sources': [ '<@(chrome_common_mac_sources)' ],
358         }],
359         ['OS != "ios"', {
360           'dependencies': [
361             '<(DEPTH)/components/components.gyp:autofill_core_common',
362             '<(DEPTH)/components/components.gyp:autofill_content_common',
363             '<(DEPTH)/components/components.gyp:password_manager_core_common',
364             '<(DEPTH)/components/components.gyp:password_manager_content_common',
365             '<(DEPTH)/components/components.gyp:signin_core_common',
366             '<(DEPTH)/components/components.gyp:translate_content_common',
367             '<(DEPTH)/components/components.gyp:visitedlink_common',
368             '<(DEPTH)/extensions/extensions.gyp:extensions_common',
369             '<(DEPTH)/ipc/ipc.gyp:ipc',
370             '<(DEPTH)/third_party/re2/re2.gyp:re2',
371             '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
372           ],
373         }, {  # OS == ios
374           'sources/': [
375             ['exclude', '^common/child_process_'],
376             ['exclude', '^common/chrome_content_client\\.cc$'],
377             ['exclude', '^common/chrome_version_info_posix\\.cc$'],
378             ['exclude', '^common/common_message_generator\\.cc$'],
379             ['exclude', '^common/common_param_traits'],
380             ['exclude', '^common/custom_handlers/'],
381             ['exclude', '^common/extensions/'],
382             ['exclude', '^common/logging_chrome\\.'],
383             ['exclude', '^common/media_galleries/'],
384             ['exclude', '^common/multi_process_'],
385             ['exclude', '^common/profiling\\.'],
386             ['exclude', '^common/spellcheck_'],
387             ['exclude', '^common/validation_message_'],
388             ['exclude', '^common/web_apps\\.'],
389             # TODO(ios): Include files here as they are made to work; once
390             # everything is online, remove everything below here and just
391             # use the exclusions above.
392             ['exclude', '\\.(cc|mm)$'],
393             ['include', '_ios\\.(cc|mm)$'],
394             ['include', '(^|/)ios/'],
395             ['include', '^common/chrome_version_info\\.cc$'],
396             ['include', '^common/translate'],
397             ['include', '^common/zip'],
398           ],
399           'include_dirs': [
400             '<(DEPTH)/breakpad/src',
401           ],
402         }],
403         ['disable_nacl==0', {
404           'dependencies': [
405             '<(DEPTH)/components/nacl.gyp:nacl_common',
406             '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
407           ],
408         }],
409         ['enable_plugins==1', {
410           'dependencies': [
411             '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
412           ],
413           'sources': [
414             'common/pepper_flash.cc',
415             'common/pepper_flash.h',
416             'common/pepper_permission_util.cc',
417             'common/pepper_permission_util.h',
418           ],
419         }],
420         ['enable_printing==0', {
421           'sources!': [
422             'common/print_messages.cc',
423             'common/print_messages.h',
424           ]
425         }, {
426           'dependencies': [
427             '<(DEPTH)/printing/printing.gyp:printing',
428           ],
429         }],
430         ['enable_printing==1', {
431           'sources': [ '<@(chrome_common_service_process_sources)' ],
432         }],
433         ['enable_service_discovery==1', {
434           'sources' : [
435             'common/local_discovery/service_discovery_client.cc',
436             'common/local_discovery/service_discovery_client.h',
437            ]
438         }],
439         ['enable_mdns==1', {
440           'sources' : [
441             'common/local_discovery/service_discovery_client_impl.cc',
442             'common/local_discovery/service_discovery_client_impl.h',
443           ]
444         }],
445         ['OS=="android"', {
446           'sources!': [
447             'common/badge_util.cc',
448             'common/chrome_version_info_posix.cc',
449             'common/extensions/api/spellcheck/spellcheck_handler.cc',
450             'common/extensions/manifest_handlers/extension_action_handler.cc',
451             'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
452             'common/icon_with_badge_image_source.cc',
453             'common/media_galleries/metadata_types.h',
454             'common/net/url_util.cc',
455             'common/spellcheck_common.cc',
456           ],
457         }, {
458           # Non-Android.
459           'sources': [ '<@(chrome_common_importer_sources)' ]
460         }],
461         ['OS=="win"', {
462           'include_dirs': [
463             '<(DEPTH)/breakpad/src',
464             '<(DEPTH)/third_party/wtl/include',
465           ],
466           'dependencies': [
467             '<(DEPTH)/components/components.gyp:dom_distiller_core',  # Needed by chrome_content_client.cc.
468           ],
469         }],
470         ['enable_mdns == 1', {
471             'sources': [
472               'common/local_discovery/local_discovery_messages.h',
473             ]
474         }],
475         ['OS=="mac"', {
476           'dependencies': [
477             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
478             '../third_party/mach_override/mach_override.gyp:mach_override',
479           ],
480           'include_dirs': [
481             '<(DEPTH)/breakpad/src',
482           ],
483           'sources!': [
484             'common/chrome_version_info_posix.cc',
485           ],
486         }],
487         ['remoting==1', {
488           'dependencies': [
489             '../remoting/remoting.gyp:remoting_client_plugin',
490           ],
491         }],
492         ['enable_webrtc==0', {
493           'sources!': [
494             'common/media/webrtc_logging_messages.h',
495           ]
496         }],
497         ['configuration_policy==1', {
498           'dependencies': [
499             '<(DEPTH)/components/components.gyp:policy',
500           ],
501         }],
502         ['safe_browsing==1', {
503           'defines': [ 'FULL_SAFE_BROWSING' ],
504           'sources': [ '<@(chrome_common_full_safe_browsing_sources)', ],
505         }],
506         ['safe_browsing==2', {
507           'defines': [ 'MOBILE_SAFE_BROWSING' ],
508         }],
509         ['use_openssl==1', {
510            'sources!': [
511              'common/extensions/api/networking_private/networking_private_crypto_nss.cc',
512            ],
513          },
514          {  # else !use_openssl
515            'sources!': [
516              'common/extensions/api/networking_private/networking_private_crypto_openssl.cc',
517            ],
518          },
519         ],
520       ],
521       'target_conditions': [
522         ['OS == "ios"', {
523           'sources/': [
524             # Pull in specific Mac files for iOS (which have been filtered out
525             # by file name rules).
526             ['include', '^common/chrome_version_info_mac\\.mm$'],
527           ],
528         }],
529       ],
530       'export_dependent_settings': [
531         '../base/base.gyp:base',
532       ],
533     },
534     {
535       # GN version: //chrome/common:version
536       'target_name': 'common_version',
537       'type': 'none',
538       'conditions': [
539         ['os_posix == 1 and OS != "mac" and OS != "ios"', {
540           'direct_dependent_settings': {
541             'include_dirs': [
542               '<(SHARED_INTERMEDIATE_DIR)',
543             ],
544           },
545           # Because posix_version generates a header, we must set the
546           # hard_dependency flag.
547           'hard_dependency': 1,
548           'actions': [
549             {
550               'action_name': 'posix_version',
551               'variables': {
552                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
553                 'version_py_path': '<(DEPTH)/build/util/version.py',
554                 'version_path': 'VERSION',
555                 'template_input_path': 'common/chrome_version_info_posix.h.version',
556               },
557               'conditions': [
558                 [ 'branding == "Chrome"', {
559                   'variables': {
560                      'branding_path':
561                        'app/theme/google_chrome/BRANDING',
562                   },
563                 }, { # else branding!="Chrome"
564                   'variables': {
565                      'branding_path':
566                        'app/theme/chromium/BRANDING',
567                   },
568                 }],
569               ],
570               'inputs': [
571                 '<(template_input_path)',
572                 '<(version_path)',
573                 '<(branding_path)',
574                 '<(lastchange_path)',
575               ],
576               'outputs': [
577                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h',
578               ],
579               'action': [
580                 'python',
581                 '<(version_py_path)',
582                 '-f', '<(version_path)',
583                 '-f', '<(branding_path)',
584                 '-f', '<(lastchange_path)',
585                 '<(template_input_path)',
586                 '<@(_outputs)',
587               ],
588               'message': 'Generating version information',
589             },
590           ],
591         }],
592       ],
593     },
594     {
595       # GN version: //chrome/common/net
596       'target_name': 'common_net',
597       'type': 'static_library',
598       'sources': [
599         'common/net/net_error_info.cc',
600         'common/net/net_error_info.h',
601         'common/net/net_resource_provider.cc',
602         'common/net/net_resource_provider.h',
603         'common/net/predictor_common.h',
604         'common/net/url_util.cc',
605         'common/net/url_util.h',
606         'common/net/x509_certificate_model.cc',
607         'common/net/x509_certificate_model_nss.cc',
608         'common/net/x509_certificate_model_openssl.cc',
609         'common/net/x509_certificate_model.h',
610       ],
611       'dependencies': [
612         '<(DEPTH)/base/base.gyp:base',
613         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
614         '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
615         '<(DEPTH)/crypto/crypto.gyp:crypto',
616         '<(DEPTH)/net/net.gyp:net_resources',
617         '<(DEPTH)/net/net.gyp:net',
618         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
619         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
620       ],
621       'conditions': [
622         ['OS != "ios"', {
623           'dependencies': [
624             '<(DEPTH)/gpu/gpu.gyp:gpu_ipc',
625           ],
626         }, {  # OS == ios
627           'sources!': [
628             'common/net/net_resource_provider.cc',
629             'common/net/x509_certificate_model.cc',
630           ],
631         }],
632         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
633             'dependencies': [
634               '../build/linux/system.gyp:ssl',
635             ],
636           },
637         ],
638         ['os_posix != 1 or OS == "mac" or OS == "ios"', {
639             'sources!': [
640               'common/net/x509_certificate_model_nss.cc',
641               'common/net/x509_certificate_model_openssl.cc',
642             ],
643           },
644         ],
645         ['OS == "android"', {
646             'dependencies': [
647               '../third_party/boringssl/boringssl.gyp:boringssl',
648             ],
649             'sources!': [
650               'common/net/x509_certificate_model.cc',
651               'common/net/x509_certificate_model_openssl.cc',
652             ],
653         }],
654         ['use_openssl==1', {
655             'sources!': [
656               'common/net/x509_certificate_model_nss.cc',
657             ],
658             'dependencies': [
659               '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
660             ],
661           },
662           {  # else !use_openssl: remove the unneeded files
663             'sources!': [
664               'common/net/x509_certificate_model_openssl.cc',
665             ],
666           },
667         ],
668         ['OS=="win"', {
669             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
670             'msvs_disabled_warnings': [4267, ],
671           },
672         ],
673       ],
674     },
675     {
676       # Protobuf compiler / generator for the safebrowsing client
677       # model proto and the client-side detection (csd) request
678       # protocol buffer.
680       # GN version: //chrome/common/safe_browsing:proto
681       'target_name': 'safe_browsing_proto',
682       'type': 'static_library',
683       'sources': [
684         'common/safe_browsing/client_model.proto',
685         'common/safe_browsing/crx_info.proto',
686         'common/safe_browsing/csd.proto'
687       ],
688       'variables': {
689         'proto_in_dir': 'common/safe_browsing',
690         'proto_out_dir': 'chrome/common/safe_browsing',
691       },
692       'includes': [ '../build/protoc.gypi' ],
693     },
694   ],