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