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