1 // Copyright 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.
5 #include "extensions/common/manifest_constants.h"
9 namespace manifest_keys
{
11 const char kAboutPage
[] = "about_page";
12 const char kAllFrames
[] = "all_frames";
13 const char kAltKey
[] = "altKey";
14 const char kApp
[] = "app";
15 const char kAppIconColor
[] = "app.icon_color";
16 const char kAutomation
[] = "automation";
17 const char kBackgroundAllowJsAccess
[] = "background.allow_js_access";
18 const char kBackgroundPage
[] = "background.page";
19 const char kBackgroundPageLegacy
[] = "background_page";
20 const char kBackgroundPersistent
[] = "background.persistent";
21 const char kBackgroundScripts
[] = "background.scripts";
22 const char kBluetooth
[] = "bluetooth";
23 const char kBookmarkUI
[] = "bookmarks_ui";
24 const char kBrowserAction
[] = "browser_action";
25 const char kChromeURLOverrides
[] = "chrome_url_overrides";
26 const char kCommands
[] = "commands";
27 const char kContentCapabilities
[] = "content_capabilities";
28 const char kContentScripts
[] = "content_scripts";
29 const char kContentSecurityPolicy
[] = "content_security_policy";
30 const char kConvertedFromUserScript
[] = "converted_from_user_script";
31 const char kCopresence
[] = "copresence";
32 const char kCss
[] = "css";
33 const char kCtrlKey
[] = "ctrlKey";
34 const char kCurrentLocale
[] = "current_locale";
35 const char kDefaultLocale
[] = "default_locale";
36 const char kDescription
[] = "description";
37 const char kDevToolsPage
[] = "devtools_page";
38 const char kDisplayInLauncher
[] = "display_in_launcher";
39 const char kDisplayInNewTabPage
[] = "display_in_new_tab_page";
40 const char kEventName
[] = "event_name";
41 const char kExcludeGlobs
[] = "exclude_globs";
42 const char kExcludeMatches
[] = "exclude_matches";
43 const char kExport
[] = "export";
44 const char kExternallyConnectable
[] = "externally_connectable";
45 const char kEventRules
[] = "event_rules";
46 const char kFileAccessList
[] = "file_access";
47 const char kFileFilters
[] = "file_filters";
48 const char kFileBrowserHandlers
[] = "file_browser_handlers";
49 const char kFileHandlers
[] = "file_handlers";
50 const char kFileHandlerExtensions
[] = "extensions";
51 const char kFileHandlerTypes
[] = "types";
52 const char kGlobal
[] = "global";
53 const char kHideBookmarkButton
[] = "hide_bookmark_button";
54 const char kHomepageURL
[] = "homepage_url";
55 const char kIcons
[] = "icons";
56 const char kId
[] = "id";
57 const char kImeOptionsPage
[] = "options_page";
58 const char kImport
[] = "import";
59 const char kIncognito
[] = "incognito";
60 const char kIncludeGlobs
[] = "include_globs";
61 const char kIndicator
[] = "indicator";
62 const char kInputComponents
[] = "input_components";
63 const char kInputView
[] = "input_view";
64 const char kIsolation
[] = "app.isolation";
65 const char kJs
[] = "js";
66 const char kKey
[] = "key";
67 const char kKeycode
[] = "keyCode";
68 const char kKioskEnabled
[] = "kiosk_enabled";
69 const char kKioskOnly
[] = "kiosk_only";
70 const char kKioskMode
[] = "kiosk_mode";
71 const char kLanguage
[] = "language";
72 const char kLaunch
[] = "app.launch";
73 const char kLaunchContainer
[] = "app.launch.container";
74 const char kLauncherPage
[] = "launcher_page";
75 const char kLauncherPagePage
[] = "launcher_page.page";
76 const char kLaunchHeight
[] = "app.launch.height";
77 const char kLaunchLocalPath
[] = "app.launch.local_path";
78 const char kLaunchWebURL
[] = "app.launch.web_url";
79 const char kLaunchWidth
[] = "app.launch.width";
80 const char kLayouts
[] = "layouts";
81 const char kLinkedAppIcons
[] = "app.linked_icons";
82 const char kLinkedAppIconURL
[] = "url";
83 const char kLinkedAppIconSize
[] = "size";
84 const char kManifestVersion
[] = "manifest_version";
85 const char kMatchAboutBlank
[] = "match_about_blank";
86 const char kMatches
[] = "matches";
87 const char kMinimumChromeVersion
[] = "minimum_chrome_version";
88 const char kMinimumVersion
[] = "minimum_version";
89 const char kMIMETypes
[] = "mime_types";
90 const char kMimeTypesHandler
[] = "mime_types_handler";
91 const char kName
[] = "name";
92 const char kNaClArch
[] = "nacl_arch";
93 const char kNaClModules
[] = "nacl_modules";
94 const char kNaClModulesMIMEType
[] = "mime_type";
95 const char kNaClModulesPath
[] = "path";
96 const char kOAuth2
[] = "oauth2";
97 const char kOAuth2AutoApprove
[] = "oauth2.auto_approve";
98 const char kOAuth2ClientId
[] = "oauth2.client_id";
99 const char kOAuth2Scopes
[] = "oauth2.scopes";
100 const char kOfflineEnabled
[] = "offline_enabled";
101 const char kOmnibox
[] = "omnibox";
102 const char kOmniboxKeyword
[] = "omnibox.keyword";
103 const char kOptionalPermissions
[] = "optional_permissions";
104 const char kOptionsPage
[] = "options_page";
105 const char kOptionsUI
[] = "options_ui";
106 const char kOverrideHomepage
[] = "chrome_settings_overrides.homepage";
107 const char kOverrideSearchProvider
[] =
108 "chrome_settings_overrides.search_provider";
109 const char kOverrideStartupPage
[] = "chrome_settings_overrides.startup_pages";
110 const char kPageAction
[] = "page_action";
111 const char kPageActionDefaultIcon
[] = "default_icon";
112 const char kPageActionDefaultPopup
[] = "default_popup";
113 const char kPageActionDefaultTitle
[] = "default_title";
114 const char kPageActionIcons
[] = "icons";
115 const char kPageActionId
[] = "id";
116 const char kPageActionPopup
[] = "popup";
117 const char kPageActionPopupPath
[] = "path";
118 const char kPermissions
[] = "permissions";
119 const char kPlatformAppBackground
[] = "app.background";
120 const char kPlatformAppBackgroundPage
[] = "app.background.page";
121 const char kPlatformAppBackgroundScripts
[] = "app.background.scripts";
122 const char kPlatformAppContentSecurityPolicy
[] = "app.content_security_policy";
123 const char kPlatforms
[] = "platforms";
124 const char kPlugins
[] = "plugins";
125 const char kPluginsPath
[] = "path";
126 const char kPluginsPublic
[] = "public";
127 const char kPublicKey
[] = "key";
128 const char kRemoveButton
[] = "remove_button";
129 const char kRequirements
[] = "requirements";
130 const char kRunAt
[] = "run_at";
131 const char kSandboxedPages
[] = "sandbox.pages";
132 const char kSandboxedPagesCSP
[] = "sandbox.content_security_policy";
133 const char kSettingsOverride
[] = "chrome_settings_overrides";
134 const char kSettingsOverrideAlternateUrls
[] =
135 "chrome_settings_overrides.search_provider.alternate_urls";
136 const char kShiftKey
[] = "shiftKey";
137 const char kShortcutKey
[] = "shortcutKey";
138 const char kShortName
[] = "short_name";
139 const char kSignature
[] = "signature";
140 const char kSockets
[] = "sockets";
141 const char kSpellcheck
[] = "spellcheck";
142 const char kSpellcheckDictionaryFormat
[] = "dictionary_format";
143 const char kSpellcheckDictionaryLanguage
[] = "dictionary_language";
144 const char kSpellcheckDictionaryLocale
[] = "dictionary_locale";
145 const char kSpellcheckDictionaryPath
[] = "dictionary_path";
146 const char kStorageManagedSchema
[] = "storage.managed_schema";
147 const char kSubPackagePath
[] = "sub_package_path";
148 const char kSuggestedKey
[] = "suggested_key";
149 const char kSynthesizeExtensionAction
[] = "_synthesize_extension_action";
150 const char kSystemIndicator
[] = "system_indicator";
151 const char kTheme
[] = "theme";
152 const char kThemeColors
[] = "colors";
153 const char kThemeDisplayProperties
[] = "properties";
154 const char kThemeImages
[] = "images";
155 const char kThemeTints
[] = "tints";
156 const char kTtsEngine
[] = "tts_engine";
157 const char kTtsGenderFemale
[] = "female";
158 const char kTtsGenderMale
[] = "male";
159 const char kTtsVoices
[] = "voices";
160 const char kTtsVoicesEventTypeEnd
[] = "end";
161 const char kTtsVoicesEventTypeError
[] = "error";
162 const char kTtsVoicesEventTypeMarker
[] = "marker";
163 const char kTtsVoicesEventTypeSentence
[] = "sentence";
164 const char kTtsVoicesEventTypeStart
[] = "start";
165 const char kTtsVoicesEventTypeWord
[] = "word";
166 const char kTtsVoicesEventTypes
[] = "event_types";
167 const char kTtsVoicesGender
[] = "gender";
168 const char kTtsVoicesLang
[] = "lang";
169 const char kTtsVoicesRemote
[] = "remote";
170 const char kTtsVoicesVoiceName
[] = "voice_name";
171 const char kType
[] = "type";
172 const char kUIOverride
[] = "chrome_ui_overrides";
173 const char kUpdateURL
[] = "update_url";
174 const char kUrlHandlers
[] = "url_handlers";
175 const char kUrlHandlerTitle
[] = "title";
176 const char kUsbPrinters
[] = "usb_printers";
177 const char kVersion
[] = "version";
178 const char kVersionName
[] = "version_name";
179 const char kWebAccessibleResources
[] = "web_accessible_resources";
180 const char kWebURLs
[] = "app.urls";
181 const char kWebview
[] = "webview";
182 const char kWebviewAccessibleResources
[] = "accessible_resources";
183 const char kWebviewName
[] = "name";
184 const char kWebviewPartitions
[] = "partitions";
185 const char kWhitelist
[] = "whitelist";
186 #if defined(OS_CHROMEOS)
187 const char kFileSystemProviderCapabilities
[] =
188 "file_system_provider_capabilities";
191 } // namespace manifest_keys
193 namespace manifest_values
{
195 const char kApiKey
[] = "api_key";
196 const char kBrowserActionCommandEvent
[] = "_execute_browser_action";
197 const char kIncognitoSplit
[] = "split";
198 const char kIncognitoSpanning
[] = "spanning";
199 const char kIsolatedStorage
[] = "storage";
200 const char kKeybindingPlatformChromeOs
[] = "chromeos";
201 const char kKeybindingPlatformDefault
[] = "default";
202 const char kKeybindingPlatformLinux
[] = "linux";
203 const char kKeybindingPlatformMac
[] = "mac";
204 const char kKeybindingPlatformWin
[] = "windows";
205 const char kKeyAlt
[] = "Alt";
206 const char kKeyComma
[] = "Comma";
207 const char kKeyCommand
[] = "Command";
208 const char kKeyCtrl
[] = "Ctrl";
209 const char kKeyDel
[] = "Delete";
210 const char kKeyDown
[] = "Down";
211 const char kKeyEnd
[] = "End";
212 const char kKeyHome
[] = "Home";
213 const char kKeyIns
[] = "Insert";
214 const char kKeyLeft
[] = "Left";
215 const char kKeyMacCtrl
[] = "MacCtrl";
216 const char kKeyMediaNextTrack
[] = "MediaNextTrack";
217 const char kKeyMediaPlayPause
[] = "MediaPlayPause";
218 const char kKeyMediaPrevTrack
[] = "MediaPrevTrack";
219 const char kKeyMediaStop
[] = "MediaStop";
220 const char kKeyPgDwn
[] = "PageDown";
221 const char kKeyPgUp
[] = "PageUp";
222 const char kKeyPeriod
[] = "Period";
223 const char kKeyRight
[] = "Right";
224 const char kKeySearch
[] = "Search";
225 const char kKeySeparator
[] = "+";
226 const char kKeyShift
[] = "Shift";
227 const char kKeySpace
[] = "Space";
228 const char kKeyTab
[] = "Tab";
229 const char kKeyUp
[] = "Up";
230 const char kRunAtDocumentStart
[] = "document_start";
231 const char kRunAtDocumentEnd
[] = "document_end";
232 const char kRunAtDocumentIdle
[] = "document_idle";
233 const char kPageActionCommandEvent
[] = "_execute_page_action";
234 const char kPageActionTypeTab
[] = "tab";
235 const char kPageActionTypePermanent
[] = "permanent";
236 const char kLaunchContainerPanel
[] = "panel";
237 const char kLaunchContainerTab
[] = "tab";
238 const char kLaunchContainerWindow
[] = "window";
240 } // namespace manifest_values
242 // Extension-related error messages. Some of these are simple patterns, where a
243 // '*' is replaced at runtime with a specific value. This is used instead of
244 // printf because we want to unit test them and scanf is hard to make
246 namespace manifest_errors
{
248 const char kActiveTabPermissionNotGranted
[] =
249 "The 'activeTab' permission is not in effect because this extension has "
250 "not been in invoked.";
251 const char kAllURLOrActiveTabNeeded
[] =
252 "Either the '<all_urls>' or 'activeTab' permission is required.";
253 const char kAppsNotEnabled
[] =
254 "Apps are not enabled.";
255 const char kBackgroundPermissionNeeded
[] =
256 "Hosted apps that use 'background_page' must have the 'background' "
258 const char kBackgroundRequiredForPlatformApps
[] =
259 "Packaged apps must have a background page or background scripts.";
260 const char kCannotAccessAboutUrl
[] =
261 "Cannot access \"*\" at origin \"*\". Extension must have permission to "
262 "access the frame's origin, and matchAboutBlank must be true.";
263 const char kCannotAccessChromeUrl
[] = "Cannot access a chrome:// URL";
264 const char kCannotAccessExtensionUrl
[] =
265 "Cannot access a chrome-extension:// URL of different extension";
266 const char kCannotAccessPage
[] =
267 "Cannot access contents of url \"*\". "
268 "Extension manifest must request permission to access this host.";
269 const char kCannotChangeExtensionID
[] =
270 "Installed extensions cannot change their IDs.";
271 const char kCannotClaimAllHostsInExtent
[] =
272 "Cannot claim all hosts ('*') in an extent.";
273 const char kCannotClaimAllURLsInExtent
[] =
274 "Cannot claim all URLs in an extent.";
275 const char kCannotScriptGallery
[] =
276 "The extensions gallery cannot be scripted.";
277 const char kCannotScriptSigninPage
[] =
278 "The sign-in page cannot be scripted.";
279 const char kChromeVersionTooLow
[] =
280 "This extension requires * version * or greater.";
281 const char kDisabledByPolicy
[] =
282 "This extension has been disabled by your administrator.";
283 const char kExpectString
[] = "Expect string value.";
284 const char kInvalidAboutPage
[] = "Invalid value for 'about_page'.";
285 const char kInvalidAboutPageExpectRelativePath
[] =
286 "Invalid value for 'about_page'. Value must be a relative path.";
287 const char kInvalidAllFrames
[] =
288 "Invalid value for 'content_scripts[*].all_frames'.";
289 const char kInvalidAppIconColor
[] = "Invalid value for app.icon_color.";
290 const char kInvalidBackground
[] =
291 "Invalid value for 'background_page'.";
292 const char kInvalidBackgroundAllowJsAccess
[] =
293 "Invalid value for 'background.allow_js_access'.";
294 const char kInvalidBackgroundCombination
[] =
295 "The background.page and background.scripts properties cannot be used at "
297 const char kInvalidBackgroundScript
[] =
298 "Invalid value for 'background.scripts[*]'.";
299 const char kInvalidBackgroundScripts
[] =
300 "Invalid value for 'background.scripts'.";
301 const char kInvalidBackgroundInHostedApp
[] =
302 "Invalid value for 'background_page'. Hosted apps must specify an "
303 "absolute HTTPS URL for the background page.";
304 const char kInvalidBackgroundPersistent
[] =
305 "Invalid value for 'background.persistent'.";
306 const char kInvalidBackgroundPersistentNoPage
[] =
307 "Must specify one of background.page or background.scripts to use"
308 " background.persistent.";
309 const char kInvalidBrowserAction
[] =
310 "Invalid value for 'browser_action'.";
311 const char kInvalidChromeURLOverrides
[] =
312 "Invalid value for 'chrome_url_overrides'.";
313 const char kInvalidCommandsKey
[] =
314 "Invalid value for 'commands'.";
315 const char kInvalidContentCapabilities
[] =
316 "Invalid value for 'content_capabilities'.";
317 const char kInvalidContentCapabilitiesMatch
[] =
318 "Invalid content_capabilities URL pattern: *";
319 const char kInvalidContentCapabilitiesMatchOrigin
[] =
320 "Domain wildcards are not allowed for content_capabilities URL patterns.";
321 const char kInvalidContentCapabilitiesPermission
[] =
322 "Invalid content_capabilities permission: *.";
323 const char kInvalidContentScript
[] =
324 "Invalid value for 'content_scripts[*]'.";
325 const char kInvalidContentScriptsList
[] =
326 "Invalid value for 'content_scripts'.";
327 const char kInvalidContentSecurityPolicy
[] =
328 "Invalid value for 'content_security_policy'.";
329 const char kInvalidCopresenceConfig
[] = "Invalid value for 'copresence'.";
330 const char kInvalidCopresenceApiKey
[] =
331 "copresence.api_key must not be empty.";
332 const char kInvalidCSPInsecureValue
[] =
333 "Ignored insecure CSP value \"*\" in directive '*'.";
334 const char kInvalidCSPMissingSecureSrc
[] =
335 "CSP directive '*' must be specified (either explicitly, or implicitly via"
336 " 'default-src') and must whitelist only secure resources.";
337 const char kInvalidCss
[] =
338 "Invalid value for 'content_scripts[*].css[*]'.";
339 const char kInvalidCssList
[] =
340 "Required value 'content_scripts[*].css' is invalid.";
341 const char kInvalidDefaultLocale
[] =
342 "Invalid value for default locale - locale name must be a string.";
343 const char kInvalidDescription
[] =
344 "Invalid value for 'description'.";
345 const char kInvalidDevToolsPage
[] =
346 "Invalid value for 'devtools_page'.";
347 const char kInvalidDisplayInLauncher
[] =
348 "Invalid value for 'display_in_launcher'.";
349 const char kInvalidDisplayInNewTabPage
[] =
350 "Invalid value for 'display_in_new_tab_page'.";
351 const char kInvalidEmptyDictionary
[] = "Empty dictionary for '*'.";
352 const char kInvalidExcludeMatch
[] =
353 "Invalid value for 'content_scripts[*].exclude_matches[*]': *";
354 const char kInvalidExcludeMatches
[] =
355 "Invalid value for 'content_scripts[*].exclude_matches'.";
356 const char kInvalidExport
[] =
357 "Invalid value for 'export'.";
358 const char kInvalidExportPermissions
[] =
359 "Permissions are not allowed for extensions that export resources.";
360 const char kInvalidExportWhitelist
[] =
361 "Invalid value for 'export.whitelist'.";
362 const char kInvalidExportWhitelistString
[] =
363 "Invalid value for 'export.whitelist[*]'.";
364 const char kInvalidFileAccessList
[] =
365 "Invalid value for 'file_access'.";
366 const char kInvalidFileAccessValue
[] =
367 "Invalid value for 'file_access[*]'.";
368 const char kInvalidFileBrowserHandler
[] =
369 "Invalid value for 'file_browser_handlers'.";
370 const char kInvalidFileBrowserHandlerMissingPermission
[] =
371 "Declaring file browser handlers requires the fileBrowserHandler manifest "
373 const char kInvalidFileFiltersList
[] =
374 "Invalid value for 'file_filters'.";
375 const char kInvalidFileFilterValue
[] =
376 "Invalid value for 'file_filters[*]'.";
377 const char kInvalidFileHandlers
[] =
378 "Invalid value for 'file_handlers'.";
379 const char kInvalidFileHandlersTooManyTypesAndExtensions
[] =
380 "Too many MIME and extension file_handlers have been declared.";
381 const char kInvalidFileHandlerExtension
[] =
382 "Invalid value for 'file_handlers[*].extensions'.";
383 const char kInvalidFileHandlerExtensionElement
[] =
384 "Invalid value for 'file_handlers[*].extensions[*]'.";
385 const char kInvalidFileHandlerNoTypeOrExtension
[] =
386 "'file_handlers[*]' must contain a non-empty 'types' or 'extensions'.";
387 const char kInvalidFileHandlerType
[] =
388 "Invalid value for 'file_handlers[*].types'.";
389 const char kInvalidFileHandlerTypeElement
[] =
390 "Invalid value for 'file_handlers[*].types[*]'.";
391 const char kInvalidGlob
[] =
392 "Invalid value for 'content_scripts[*].*[*]'.";
393 const char kInvalidGlobList
[] =
394 "Invalid value for 'content_scripts[*].*'.";
395 const char kInvalidHomepageOverrideURL
[] =
396 "Invalid value for overriding homepage url: '[*]'.";
397 const char kInvalidHomepageURL
[] =
398 "Invalid value for homepage url: '[*]'.";
399 const char kInvalidIconPath
[] =
400 "Invalid value for 'icons[\"*\"]'.";
401 const char kInvalidIcons
[] =
402 "Invalid value for 'icons'.";
403 const char kInvalidImport
[] =
404 "Invalid value for 'import'.";
405 const char kInvalidImportAndExport
[] =
406 "Simultaneous 'import' and 'export' are not allowed.";
407 const char kInvalidImportId
[] =
408 "Invalid value for 'import[*].id'.";
409 const char kInvalidImportVersion
[] =
410 "Invalid value for 'import[*].minimum_version'.";
411 const char kInvalidIncognitoBehavior
[] =
412 "Invalid value for 'incognito'.";
413 const char kInvalidInputComponents
[] =
414 "Invalid value for 'input_components'";
415 const char kInvalidInputComponentDescription
[] =
416 "Invalid value for 'input_components[*].description";
417 const char kInvalidInputComponentLayoutName
[] =
418 "Invalid value for 'input_components[*].layouts[*]";
419 const char kInvalidInputComponentName
[] =
420 "Invalid value for 'input_components[*].name";
421 const char kInvalidInputComponentShortcutKey
[] =
422 "Invalid value for 'input_components[*].shortcutKey";
423 const char kInvalidInputComponentShortcutKeycode
[] =
424 "Invalid value for 'input_components[*].shortcutKey.keyCode";
425 const char kInvalidInputComponentType
[] =
426 "Invalid value for 'input_components[*].type";
427 const char kInvalidInputView
[] =
428 "Invalid value for 'input_view'.";
429 const char kInvalidIsolation
[] =
430 "Invalid value for 'app.isolation'.";
431 const char kInvalidIsolationValue
[] =
432 "Invalid value for 'app.isolation[*]'.";
433 const char kInvalidJs
[] =
434 "Invalid value for 'content_scripts[*].js[*]'.";
435 const char kInvalidJsList
[] =
436 "Required value 'content_scripts[*].js' is invalid.";
437 const char kInvalidKey
[] =
438 "Value 'key' is missing or invalid.";
439 const char kInvalidKeyBinding
[] =
440 "Invalid value for 'commands[*].*': *.";
441 const char kInvalidKeyBindingDescription
[] =
442 "Invalid value for 'commands[*].description'.";
443 const char kInvalidKeyBindingDictionary
[] =
444 "Contents of 'commands[*]' invalid.";
445 const char kInvalidKeyBindingMediaKeyWithModifier
[] =
446 "Media key cannot have any modifier for 'commands[*].*': *.";
447 const char kInvalidKeyBindingMissingPlatform
[] =
448 "Could not find key specification for 'command[*].*': Either specify a key "
449 "for '*', or specify a default key.";
450 const char kInvalidKeyBindingTooMany
[] =
451 "Too many shortcuts specified for 'commands': The maximum is *.";
452 const char kInvalidKeyBindingUnknownPlatform
[] =
453 "Unknown platform for 'command[*]': *. Valid values are: 'windows', 'mac'"
454 " 'chromeos', 'linux' and 'default'.";
455 const char kInvalidKioskEnabled
[] =
456 "Invalid value for 'kiosk_enabled'.";
457 const char kInvalidKioskOnly
[] =
458 "Invalid value for 'kiosk_only'.";
459 const char kInvalidKioskOnlyButNotEnabled
[] =
460 "The 'kiosk_only' key is set, but 'kiosk_enabled' is not set.";
461 const char kInvalidLauncherPage
[] = "Invalid value for 'launcher_page'.";
462 const char kInvalidLauncherPagePage
[] =
463 "Invalid value for 'launcher_page.page'.";
464 const char kInvalidLaunchContainer
[] =
465 "Invalid value for 'app.launch.container'.";
466 const char kInvalidLaunchValue
[] =
467 "Invalid value for '*'.";
468 const char kInvalidLaunchValueContainer
[] =
469 "Invalid container type for '*'.";
470 const char kInvalidLinkedAppIcon
[] =
471 "Invalid linked app icon. Must be a dictionary";
472 const char kInvalidLinkedAppIconSize
[] =
473 "Invalid 'size' for linked app icon. Must be an integer";
474 const char kInvalidLinkedAppIconURL
[] =
475 "Invalid 'url' for linked app icon. Must be a string that is a valid URL";
476 const char kInvalidLinkedAppIcons
[] =
477 "Invalid 'app.linked_icons'. Must be an array";
478 const char kInvalidManifest
[] =
479 "Manifest file is invalid.";
480 const char kInvalidManifestVersion
[] =
481 "Invalid value for 'manifest_version'. Must be an integer greater than "
483 const char kInvalidManifestVersionOld
[] =
484 "The 'manifest_version' key must be present and set to * (without quotes). "
485 "See developer.chrome.com/*/manifestVersion.html for details.";
486 const char kInvalidMatch
[] =
487 "Invalid value for 'content_scripts[*].matches[*]': *";
488 const char kInvalidMatchAboutBlank
[] =
489 "Invalid value for 'content_scripts[*].match_about_blank'.";
490 const char kInvalidMatchCount
[] =
491 "Invalid value for 'content_scripts[*].matches'. There must be at least "
492 "one match specified.";
493 const char kInvalidMatches
[] =
494 "Required value 'content_scripts[*].matches' is missing or invalid.";
495 const char kInvalidMIMETypes
[] =
496 "Invalid value for 'mime_types'";
497 const char kInvalidMimeTypesHandler
[] =
498 "Invalid value for 'mime_types'.";
499 const char kInvalidMinimumChromeVersion
[] =
500 "Invalid value for 'minimum_chrome_version'.";
501 const char kInvalidName
[] =
502 "Required value 'name' is missing or invalid.";
503 const char kInvalidNaClModules
[] =
504 "Invalid value for 'nacl_modules'.";
505 const char kInvalidNaClModulesPath
[] =
506 "Invalid value for 'nacl_modules[*].path'.";
507 const char kInvalidNaClModulesMIMEType
[] =
508 "Invalid value for 'nacl_modules[*].mime_type'.";
509 const char kInvalidOAuth2AutoApprove
[] =
510 "Invalid value for 'oauth2.auto_approve'. Value must be true or false.";
511 const char kInvalidOAuth2ClientId
[] =
512 "Invalid value for 'oauth2.client_id'.";
513 const char kInvalidOAuth2Scopes
[] =
514 "Invalid value for 'oauth2.scopes'.";
515 const char kInvalidOfflineEnabled
[] =
516 "Invalid value for 'offline_enabled'.";
517 const char kInvalidOmniboxKeyword
[] =
518 "Invalid value for 'omnibox.keyword'.";
519 const char kInvalidOptionsPage
[] = "Invalid value for '*'.";
520 const char kInvalidOptionsPageExpectUrlInPackage
[] =
521 "Invalid value for 'options_page'. Value must be a relative path.";
522 const char kInvalidOptionsPageInHostedApp
[] =
523 "Invalid value for 'options_page'. Hosted apps must specify an "
525 const char kInvalidOptionsUIChromeStyle
[] =
526 "Invalid value for 'options_ui.chrome_style'.";
527 const char kInvalidOptionsUIOpenInTab
[] =
528 "Invalid value for 'options_ui.open_in_tab'.";
529 const char kInvalidPageAction
[] =
530 "Invalid value for 'page_action'.";
531 const char kInvalidPageActionDefaultTitle
[] =
532 "Invalid value for 'default_title'.";
533 const char kInvalidPageActionIconPath
[] =
534 "Invalid value for 'page_action.default_icon'.";
535 const char kInvalidPageActionId
[] =
536 "Required value 'id' is missing or invalid.";
537 const char kInvalidPageActionName
[] =
538 "Invalid value for 'page_action.name'.";
539 const char kInvalidPageActionOldAndNewKeys
[] =
540 "Key \"*\" is deprecated. Key \"*\" has the same meaning. You can not "
542 const char kInvalidPageActionPopup
[] =
543 "Invalid type for page action popup.";
544 const char kInvalidPageActionPopupPath
[] =
545 "Invalid value for page action popup path [*].";
546 const char kInvalidPermissionWithDetail
[] =
547 "Invalid value for 'permissions[*]': *.";
548 const char kInvalidPermission
[] =
549 "Invalid value for 'permissions[*]'.";
550 const char kInvalidPermissions
[] =
551 "Invalid value for 'permissions'.";
552 const char kInvalidPermissionScheme
[] =
553 "Invalid scheme for 'permissions[*]'.";
554 const char kInvalidPlugins
[] =
555 "Invalid value for 'plugins'.";
556 const char kInvalidPluginsPath
[] =
557 "Invalid value for 'plugins[*].path'.";
558 const char kInvalidPluginsPublic
[] =
559 "Invalid value for 'plugins[*].public'.";
560 const char kInvalidRequirement
[] =
561 "Invalid value for requirement \"*\"";
562 const char kInvalidRequirements
[] =
563 "Invalid value for 'requirements'";
564 const char kInvalidRunAt
[] =
565 "Invalid value for 'content_scripts[*].run_at'.";
566 const char kInvalidSandboxedPagesList
[] =
567 "Invalid value for 'sandbox.pages'.";
568 const char kInvalidSandboxedPage
[] =
569 "Invalid value for 'sandbox.pages[*]'.";
570 const char kInvalidSandboxedPagesCSP
[] =
571 "Invalid value for 'sandbox.content_security_policy'.";
572 const char kInvalidSearchEngineMissingKeys
[] =
573 "Missing mandatory parameters for "
574 "'chrome_settings_overrides.search_provider'.";
575 const char kInvalidSearchEngineURL
[] =
576 "Invalid URL [*] for 'chrome_settings_overrides.search_provider'.";
577 const char kInvalidShortName
[] =
578 "Invalid value for 'short_name'.";
579 const char kInvalidSignature
[] =
580 "Value 'signature' is missing or invalid.";
581 const char kInvalidSpellcheck
[] =
582 "Invalid value for 'spellcheck'.";
583 const char kInvalidSpellcheckDictionaryFormat
[] =
584 "Invalid value for spellcheck dictionary format.";
585 const char kInvalidSpellcheckDictionaryLanguage
[] =
586 "Invalid value for spellcheck dictionary language.";
587 const char kInvalidSpellcheckDictionaryLocale
[] =
588 "Invalid value for spellcheck dictionary locale.";
589 const char kInvalidSpellcheckDictionaryPath
[] =
590 "Invalid value for spellcheck dictionary path.";
591 const char kInvalidStartupOverrideURL
[] =
592 "Invalid value for overriding startup URL: '[*]'.";
593 const char kInvalidSystemIndicator
[] =
594 "Invalid value for 'system_indicator'.";
595 const char kInvalidTheme
[] =
596 "Invalid value for 'theme'.";
597 const char kInvalidThemeColors
[] =
598 "Invalid value for theme colors - colors must be integers";
599 const char kInvalidThemeImages
[] =
600 "Invalid value for theme images - images must be strings.";
601 const char kInvalidThemeImagesMissing
[] =
602 "An image specified in the theme is missing.";
603 const char kInvalidThemeTints
[] =
604 "Invalid value for theme images - tints must be decimal numbers.";
605 const char kInvalidTts
[] =
606 "Invalid value for 'tts_engine'.";
607 const char kInvalidTtsVoices
[] =
608 "Invalid value for 'tts_engine.voices'.";
609 const char kInvalidTtsVoicesEventTypes
[] =
610 "Invalid value for 'tts_engine.voices[*].event_types'.";
611 const char kInvalidTtsVoicesGender
[] =
612 "Invalid value for 'tts_engine.voices[*].gender'.";
613 const char kInvalidTtsVoicesLang
[] =
614 "Invalid value for 'tts_engine.voices[*].lang'.";
615 const char kInvalidTtsVoicesRemote
[] =
616 "Invalid value for 'tts_engine.voices[*].remote'.";
617 const char kInvalidTtsVoicesVoiceName
[] =
618 "Invalid value for 'tts_engine.voices[*].voice_name'.";
619 const char kInvalidUpdateURL
[] =
620 "Invalid value for update url: '[*]'.";
621 const char kInvalidURLHandlers
[] =
622 "Invalid value for 'url_handlers'.";
623 const char kInvalidURLHandlerPatternElement
[] =
624 "Invalid value for 'url_handlers[*]'.";
625 const char kInvalidURLHandlerTitle
[] =
626 "Invalid value for 'url_handlers[*].title'.";
627 const char kInvalidURLHandlerPattern
[] =
628 "Invalid value for 'url_handlers[*].matches[*]'.";
629 const char kInvalidURLPatternError
[] =
630 "Invalid url pattern '*'";
631 const char kInvalidVersion
[] =
632 "Required value 'version' is missing or invalid. It must be between 1-4 "
633 "dot-separated integers each between 0 and 65536.";
634 const char kInvalidVersionName
[] = "Invalid value for 'version_name'.";
635 const char kInvalidWebAccessibleResourcesList
[] =
636 "Invalid value for 'web_accessible_resources'.";
637 const char kInvalidWebAccessibleResource
[] =
638 "Invalid value for 'web_accessible_resources[*]'.";
639 const char kInvalidWebview
[] =
640 "Invalid value for 'webview'.";
641 const char kInvalidWebviewAccessibleResourcesList
[] =
642 "Invalid value for'webview.accessible_resources'.";
643 const char kInvalidWebviewAccessibleResource
[] =
644 "Invalid value for 'webview.accessible_resources[*]'.";
645 const char kInvalidWebviewPartition
[] =
646 "Invalid value for 'webview.partitions[*]'.";
647 const char kInvalidWebviewPartitionName
[] =
648 "Invalid value for 'webview.partitions[*].name'.";
649 const char kInvalidWebviewPartitionsList
[] =
650 "Invalid value for 'webview.partitions'.";
651 const char kInvalidWebURL
[] =
652 "Invalid value for 'app.urls[*]': *";
653 const char kInvalidWebURLs
[] =
654 "Invalid value for 'app.urls'.";
655 const char kInvalidZipHash
[] =
656 "Required key 'zip_hash' is missing or invalid.";
657 const char kKeyIsDeprecatedWithReplacement
[] =
658 "Key \"*\" is deprecated. Key \"*\" should be used instead.";
659 const char kLauncherPagePageRequired
[] =
660 "The 'launcher_page.page' key is required.";
661 const char kLaunchPathAndExtentAreExclusive
[] =
662 "The 'app.launch.local_path' and 'app.urls' keys cannot both be set.";
663 const char kLaunchPathAndURLAreExclusive
[] =
664 "The 'app.launch.local_path' and 'app.launch.web_url' keys cannot "
666 const char kLaunchURLRequired
[] =
667 "Either 'app.launch.local_path' or 'app.launch.web_url' is required.";
668 const char kLocalesInvalidLocale
[] =
669 "Invalid locale file '*': *";
670 const char kLocalesMessagesFileMissing
[] =
671 "Messages file is missing for locale.";
672 const char kLocalesNoDefaultLocaleSpecified
[] =
673 "Localization used, but default_locale wasn't specified in the manifest.";
674 const char kLocalesNoDefaultMessages
[] =
675 "Default locale is defined but default data couldn't be loaded.";
676 const char kLocalesNoValidLocaleNamesListed
[] =
677 "No valid locale name could be found in _locales directory.";
678 const char kLocalesTreeMissing
[] =
679 "Default locale was specified, but _locales subtree is missing.";
680 const char kManifestParseError
[] =
681 "Manifest is not valid JSON.";
682 const char kManifestUnreadable
[] =
683 "Manifest file is missing or unreadable.";
684 const char kMissingFile
[] =
685 "At least one js or css file is required for 'content_scripts[*]'.";
686 const char kMultipleOverrides
[] =
687 "An extension cannot override more than one page.";
688 const char kNoPermissionForMIMETypes
[] =
689 "The extension is not allowed to use mime_types key.";
690 const char kNoWildCardsInPaths
[] =
691 "Wildcards are not allowed in extent URL pattern paths.";
692 const char kOneUISurfaceOnly
[] =
693 "Only one of 'browser_action', 'page_action', and 'app' can be specified.";
694 const char kPermissionMustBeOptional
[] =
695 "Permission '*' must be specified in the optional section of the manifest.";
696 const char kPermissionNotAllowed
[] =
697 "Access to permission '*' denied.";
698 const char kPermissionNotAllowedInManifest
[] =
699 "Permission '*' cannot be specified in the manifest.";
700 const char kPermissionUnknownOrMalformed
[] =
701 "Permission '*' is unknown or URL pattern is malformed.";
702 const char kReservedMessageFound
[] =
703 "Reserved key * found in message catalog.";
704 const char kUnrecognizedManifestKey
[] = "Unrecognized manifest key '*'.";
705 const char kUnrecognizedManifestProperty
[] =
706 "Unrecognized property '*' of manifest key '*'.";
707 const char kWebRequestConflictsWithLazyBackground
[] =
708 "The 'webRequest' API cannot be used with event pages.";
709 #if defined(OS_CHROMEOS)
710 const char kIllegalPlugins
[] =
711 "Extensions cannot install plugins on Chrome OS.";
712 const char kInvalidFileSystemProviderMissingCapabilities
[] =
713 "The 'fileSystemProvider' permission requires the "
714 "'file_system_provider_capabilities' section to be specified in the "
716 const char kInvalidFileSystemProviderMissingPermission
[] =
717 "The 'file_system_provider_capabilities' section requires the "
718 "'fileSystemProvider' permission to be specified in the manifest.";
721 } // namespace manifest_errors
723 } // namespace extensions