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