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