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