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