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