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