summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-24 21:37:01 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-24 21:37:01 +0000
commit173ca873f69c128c933310b962972082bb6068e1 (patch)
treef02d845524da4e45774b8a0d31c7072581cb73fe /chrome/common
parent5026491dc760085cb5471e605459f86bdd978e25 (diff)
downloadchromium_src-173ca873f69c128c933310b962972082bb6068e1.zip
chromium_src-173ca873f69c128c933310b962972082bb6068e1.tar.gz
chromium_src-173ca873f69c128c933310b962972082bb6068e1.tar.bz2
Remove potentially many static initializers.
|const char* kFoo| marks the memory pointed to by kFoo as constant, but the pointer itself can be changed - some function might do `kFoo = "me!";`. Because of that, every global that's initialized with `myglobal = kFoo;` needs a static initializer. Fix this by making the pointer const as well. BUG=94925 TEST=none Review URL: http://codereview.chromium.org/8693005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension_constants.cc538
-rw-r--r--chrome/common/extensions/extension_constants.h542
-rw-r--r--chrome/common/extensions/extension_l10n_util_unittest.cc2
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc2
-rw-r--r--chrome/common/extensions/extension_unpacker_unittest.cc17
5 files changed, 553 insertions, 548 deletions
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index 85bfd52..477a0e3 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -12,123 +12,123 @@
namespace extension_manifest_keys {
-const char* kAllFrames = "all_frames";
-const char* kAltKey = "altKey";
-const char* kApp = "app";
-const char* kBackground = "background_page";
-const char* kBrowserAction = "browser_action";
-const char* kChromeURLOverrides = "chrome_url_overrides";
-const char* kContentScripts = "content_scripts";
-const char* kContentSecurityPolicy = "content_security_policy";
-const char* kConvertedFromUserScript = "converted_from_user_script";
-const char* kCss = "css";
-const char* kCtrlKey = "ctrlKey";
-const char* kCurrentLocale = "current_locale";
-const char* kDefaultLocale = "default_locale";
-const char* kDescription = "description";
-const char* kDevToolsPage = "devtools_page";
-const char* kExcludeGlobs = "exclude_globs";
-const char* kExcludeMatches = "exclude_matches";
-const char* kFileFilters = "file_filters";
-const char* kFileBrowserHandlers = "file_browser_handlers";
-const char* kHomepageURL = "homepage_url";
-const char* kIcons = "icons";
-const char* kId = "id";
-const char* kIncognito = "incognito";
-const char* kIncludeGlobs = "include_globs";
-const char* kInputComponents = "input_components";
-const char* kIntents = "intents";
-const char* kIntentType = "type";
-const char* kIntentPath = "path";
-const char* kIntentTitle = "title";
-const char* kIntentDisposition = "disposition";
-const char* kIsolation = "app.isolation";
-const char* kJs = "js";
-const char* kKeycode = "keyCode";
-const char* kLanguage = "language";
-const char* kLaunch = "app.launch";
-const char* kLaunchContainer = "app.launch.container";
-const char* kLaunchHeight = "app.launch.height";
-const char* kLaunchLocalPath = "app.launch.local_path";
-const char* kLaunchWebURL = "app.launch.web_url";
-const char* kLaunchWidth = "app.launch.width";
-const char* kLayouts = "layouts";
-const char* kManifestVersion = "manifest_version";
-const char* kMatches = "matches";
-const char* kMinimumChromeVersion = "minimum_chrome_version";
-const char* kName = "name";
-const char* kNaClModules = "nacl_modules";
-const char* kNaClModulesMIMEType = "mime_type";
-const char* kNaClModulesPath = "path";
-const char* kOfflineEnabled = "offline_enabled";
-const char* kOmnibox = "omnibox";
-const char* kOmniboxKeyword = "omnibox.keyword";
-const char* kOptionalPermissions = "optional_permissions";
-const char* kOptionsPage = "options_page";
-const char* kPageAction = "page_action";
-const char* kPageActionDefaultIcon = "default_icon";
-const char* kPageActionDefaultPopup = "default_popup";
-const char* kPageActionDefaultTitle = "default_title";
-const char* kPageActionIcons = "icons";
-const char* kPageActionId = "id";
-const char* kPageActionPopup = "popup";
-const char* kPageActionPopupHeight = "height";
-const char* kPageActionPopupPath = "path";
-const char* kPageActions = "page_actions";
-const char* kPermissions = "permissions";
-const char* kPlatformApp = "platform_app";
-const char* kPlugins = "plugins";
-const char* kPluginsPath = "path";
-const char* kPluginsPublic = "public";
-const char* kPublicKey = "key";
-const char* kRequirements = "requirements";
-const char* kRunAt = "run_at";
-const char* kShiftKey = "shiftKey";
-const char* kShortcutKey = "shortcutKey";
-const char* kSidebar = "sidebar";
-const char* kSidebarDefaultIcon = "default_icon";
-const char* kSidebarDefaultPage = "default_page";
-const char* kSidebarDefaultTitle = "default_title";
-const char* kSignature = "signature";
-const char* kTheme = "theme";
-const char* kThemeColors = "colors";
-const char* kThemeDisplayProperties = "properties";
-const char* kThemeImages = "images";
-const char* kThemeTints = "tints";
-const char* kTtsEngine = "tts_engine";
-const char* kTtsGenderFemale = "female";
-const char* kTtsGenderMale = "male";
-const char* kTtsVoices = "voices";
-const char* kTtsVoicesEventTypeEnd = "end";
-const char* kTtsVoicesEventTypeError = "error";
-const char* kTtsVoicesEventTypeMarker = "marker";
-const char* kTtsVoicesEventTypeSentence = "sentence";
-const char* kTtsVoicesEventTypeStart = "start";
-const char* kTtsVoicesEventTypeWord = "word";
-const char* kTtsVoicesEventTypes = "event_types";
-const char* kTtsVoicesGender = "gender";
-const char* kTtsVoicesLang = "lang";
-const char* kTtsVoicesVoiceName = "voice_name";
-const char* kType = "type";
-const char* kUpdateURL = "update_url";
-const char* kVersion = "version";
-const char* kWebURLs = "app.urls";
+const char kAllFrames[] = "all_frames";
+const char kAltKey[] = "altKey";
+const char kApp[] = "app";
+const char kBackground[] = "background_page";
+const char kBrowserAction[] = "browser_action";
+const char kChromeURLOverrides[] = "chrome_url_overrides";
+const char kContentScripts[] = "content_scripts";
+const char kContentSecurityPolicy[] = "content_security_policy";
+const char kConvertedFromUserScript[] = "converted_from_user_script";
+const char kCss[] = "css";
+const char kCtrlKey[] = "ctrlKey";
+const char kCurrentLocale[] = "current_locale";
+const char kDefaultLocale[] = "default_locale";
+const char kDescription[] = "description";
+const char kDevToolsPage[] = "devtools_page";
+const char kExcludeGlobs[] = "exclude_globs";
+const char kExcludeMatches[] = "exclude_matches";
+const char kFileFilters[] = "file_filters";
+const char kFileBrowserHandlers[] = "file_browser_handlers";
+const char kHomepageURL[] = "homepage_url";
+const char kIcons[] = "icons";
+const char kId[] = "id";
+const char kIncognito[] = "incognito";
+const char kIncludeGlobs[] = "include_globs";
+const char kInputComponents[] = "input_components";
+const char kIntents[] = "intents";
+const char kIntentType[] = "type";
+const char kIntentPath[] = "path";
+const char kIntentTitle[] = "title";
+const char kIntentDisposition[] = "disposition";
+const char kIsolation[] = "app.isolation";
+const char kJs[] = "js";
+const char kKeycode[] = "keyCode";
+const char kLanguage[] = "language";
+const char kLaunch[] = "app.launch";
+const char kLaunchContainer[] = "app.launch.container";
+const char kLaunchHeight[] = "app.launch.height";
+const char kLaunchLocalPath[] = "app.launch.local_path";
+const char kLaunchWebURL[] = "app.launch.web_url";
+const char kLaunchWidth[] = "app.launch.width";
+const char kLayouts[] = "layouts";
+const char kManifestVersion[] = "manifest_version";
+const char kMatches[] = "matches";
+const char kMinimumChromeVersion[] = "minimum_chrome_version";
+const char kName[] = "name";
+const char kNaClModules[] = "nacl_modules";
+const char kNaClModulesMIMEType[] = "mime_type";
+const char kNaClModulesPath[] = "path";
+const char kOfflineEnabled[] = "offline_enabled";
+const char kOmnibox[] = "omnibox";
+const char kOmniboxKeyword[] = "omnibox.keyword";
+const char kOptionalPermissions[] = "optional_permissions";
+const char kOptionsPage[] = "options_page";
+const char kPageAction[] = "page_action";
+const char kPageActionDefaultIcon[] = "default_icon";
+const char kPageActionDefaultPopup[] = "default_popup";
+const char kPageActionDefaultTitle[] = "default_title";
+const char kPageActionIcons[] = "icons";
+const char kPageActionId[] = "id";
+const char kPageActionPopup[] = "popup";
+const char kPageActionPopupHeight[] = "height";
+const char kPageActionPopupPath[] = "path";
+const char kPageActions[] = "page_actions";
+const char kPermissions[] = "permissions";
+const char kPlatformApp[] = "platform_app";
+const char kPlugins[] = "plugins";
+const char kPluginsPath[] = "path";
+const char kPluginsPublic[] = "public";
+const char kPublicKey[] = "key";
+const char kRequirements[] = "requirements";
+const char kRunAt[] = "run_at";
+const char kShiftKey[] = "shiftKey";
+const char kShortcutKey[] = "shortcutKey";
+const char kSidebar[] = "sidebar";
+const char kSidebarDefaultIcon[] = "default_icon";
+const char kSidebarDefaultPage[] = "default_page";
+const char kSidebarDefaultTitle[] = "default_title";
+const char kSignature[] = "signature";
+const char kTheme[] = "theme";
+const char kThemeColors[] = "colors";
+const char kThemeDisplayProperties[] = "properties";
+const char kThemeImages[] = "images";
+const char kThemeTints[] = "tints";
+const char kTtsEngine[] = "tts_engine";
+const char kTtsGenderFemale[] = "female";
+const char kTtsGenderMale[] = "male";
+const char kTtsVoices[] = "voices";
+const char kTtsVoicesEventTypeEnd[] = "end";
+const char kTtsVoicesEventTypeError[] = "error";
+const char kTtsVoicesEventTypeMarker[] = "marker";
+const char kTtsVoicesEventTypeSentence[] = "sentence";
+const char kTtsVoicesEventTypeStart[] = "start";
+const char kTtsVoicesEventTypeWord[] = "word";
+const char kTtsVoicesEventTypes[] = "event_types";
+const char kTtsVoicesGender[] = "gender";
+const char kTtsVoicesLang[] = "lang";
+const char kTtsVoicesVoiceName[] = "voice_name";
+const char kType[] = "type";
+const char kUpdateURL[] = "update_url";
+const char kVersion[] = "version";
+const char kWebURLs[] = "app.urls";
} // namespace extension_manifest_keys
namespace extension_manifest_values {
-const char* kIncognitoSplit = "split";
-const char* kIncognitoSpanning = "spanning";
-const char* kIntentDispositionWindow = "window";
-const char* kIntentDispositionInline = "inline";
-const char* kIsolatedStorage = "storage";
-const char* kRunAtDocumentStart = "document_start";
-const char* kRunAtDocumentEnd = "document_end";
-const char* kRunAtDocumentIdle = "document_idle";
-const char* kPageActionTypeTab = "tab";
-const char* kPageActionTypePermanent = "permanent";
-const char* kLaunchContainerPanel = "panel";
-const char* kLaunchContainerTab = "tab";
-const char* kLaunchContainerWindow = "window";
+const char kIncognitoSplit[] = "split";
+const char kIncognitoSpanning[] = "spanning";
+const char kIntentDispositionWindow[] = "window";
+const char kIntentDispositionInline[] = "inline";
+const char kIsolatedStorage[] = "storage";
+const char kRunAtDocumentStart[] = "document_start";
+const char kRunAtDocumentEnd[] = "document_end";
+const char kRunAtDocumentIdle[] = "document_idle";
+const char kPageActionTypeTab[] = "tab";
+const char kPageActionTypePermanent[] = "permanent";
+const char kLaunchContainerPanel[] = "panel";
+const char kLaunchContainerTab[] = "tab";
+const char kLaunchContainerWindow[] = "window";
} // namespace extension_manifest_values
// Extension-related error messages. Some of these are simple patterns, where a
@@ -136,300 +136,300 @@ const char* kLaunchContainerWindow = "window";
// printf because we want to unit test them and scanf is hard to make
// cross-platform.
namespace extension_manifest_errors {
-const char* kAppsNotEnabled =
+const char kAppsNotEnabled[] =
"Apps are not enabled.";
-const char* kBackgroundPermissionNeeded =
+const char kBackgroundPermissionNeeded[] =
"Hosted apps that use 'background_page' must have the 'background' "
"permission.";
-const char* kCannotAccessPage =
+const char kCannotAccessPage[] =
"Cannot access contents of url \"*\". "
"Extension manifest must request permission to access this host.";
-const char* kCannotChangeExtensionID =
+const char kCannotChangeExtensionID[] =
"Installed extensions cannot change their IDs.";
-const char* kCannotClaimAllHostsInExtent =
+const char kCannotClaimAllHostsInExtent[] =
"Cannot claim all hosts ('*') in an extent.";
-const char* kCannotClaimAllURLsInExtent =
+const char kCannotClaimAllURLsInExtent[] =
"Cannot claim all URLs in an extent.";
-const char* kCannotScriptGallery =
+const char kCannotScriptGallery[] =
"The extensions gallery cannot be scripted.";
-const char* kCannotUninstallManagedExtension =
+const char kCannotUninstallManagedExtension[] =
"Attempted uninstallation of an extension that is not user-manageable.";
-const char* kChromeVersionTooLow =
+const char kChromeVersionTooLow[] =
"This extension requires * version * or greater.";
-const char* kDisabledByPolicy =
+const char kDisabledByPolicy[] =
"This extension has been disabled by your administrator.";
-const char* kDevToolsExperimental =
+const char kDevToolsExperimental[] =
"You must request the 'experimental' permission in order to use the"
" DevTools API.";
-const char* kExpectString = "Expect string value.";
-const char* kExperimentalFlagRequired =
+const char kExpectString[] = "Expect string value.";
+const char kExperimentalFlagRequired[] =
"Loading extensions with 'experimental' permission requires"
" --enable-experimental-extension-apis command line flag.";
-const char* kHostedAppsCannotIncludeExtensionFeatures =
+const char kHostedAppsCannotIncludeExtensionFeatures[] =
"Hosted apps cannot use the extension feature '*'.";
-const char* kInvalidAllFrames =
+const char kInvalidAllFrames[] =
"Invalid value for 'content_scripts[*].all_frames'.";
-const char* kInvalidBackground =
+const char kInvalidBackground[] =
"Invalid value for 'background_page'.";
-const char* kInvalidBackgroundInHostedApp =
+const char kInvalidBackgroundInHostedApp[] =
"Invalid value for 'background_page'. Hosted apps must specify an "
"absolute HTTPS URL for the background page.";
-const char* kInvalidBrowserAction =
+const char kInvalidBrowserAction[] =
"Invalid value for 'browser_action'.";
-const char* kInvalidChromeURLOverrides =
+const char kInvalidChromeURLOverrides[] =
"Invalid value for 'chrome_url_overrides'.";
-const char* kInvalidContentScript =
+const char kInvalidContentScript[] =
"Invalid value for 'content_scripts[*]'.";
-const char* kInvalidContentSecurityPolicy =
+const char kInvalidContentSecurityPolicy[] =
"Invalid value for 'content_security_policy'.";
-const char* kInvalidContentScriptsList =
+const char kInvalidContentScriptsList[] =
"Invalid value for 'content_scripts'.";
-const char* kInvalidCss =
+const char kInvalidCss[] =
"Invalid value for 'content_scripts[*].css[*]'.";
-const char* kInvalidCssList =
+const char kInvalidCssList[] =
"Required value 'content_scripts[*].css' is invalid.";
-const char* kInvalidDefaultLocale =
+const char kInvalidDefaultLocale[] =
"Invalid value for default locale - locale name must be a string.";
-const char* kInvalidDescription =
+const char kInvalidDescription[] =
"Invalid value for 'description'.";
-const char* kInvalidDevToolsPage =
+const char kInvalidDevToolsPage[] =
"Invalid value for 'devtools_page'.";
-const char* kInvalidExcludeMatch =
+const char kInvalidExcludeMatch[] =
"Invalid value for 'content_scripts[*].exclude_matches[*]': *";
-const char* kInvalidExcludeMatches =
+const char kInvalidExcludeMatches[] =
"Invalid value for 'content_scripts[*].exclude_matches'.";
-const char* kInvalidFileBrowserHandler =
+const char kInvalidFileBrowserHandler[] =
"Invalid value for 'file_browser_handers'.";
-const char* kInvalidFileFiltersList =
+const char kInvalidFileFiltersList[] =
"Invalid value for 'file_filters'.";
-const char* kInvalidFileFilterValue =
+const char kInvalidFileFilterValue[] =
"Invalid value for 'file_filters[*]'.";
-const char* kInvalidGlob =
+const char kInvalidGlob[] =
"Invalid value for 'content_scripts[*].*[*]'.";
-const char* kInvalidGlobList =
+const char kInvalidGlobList[] =
"Invalid value for 'content_scripts[*].*'.";
-const char* kInvalidHomepageURL =
+const char kInvalidHomepageURL[] =
"Invalid value for homepage url: '[*]'.";
-const char* kInvalidIconPath =
+const char kInvalidIconPath[] =
"Invalid value for 'icons[\"*\"]'.";
-const char* kInvalidIcons =
+const char kInvalidIcons[] =
"Invalid value for 'icons'.";
-const char* kInvalidIncognitoBehavior =
+const char kInvalidIncognitoBehavior[] =
"Invalid value for 'incognito'.";
-const char* kInvalidInputComponents =
+const char kInvalidInputComponents[] =
"Invalid value for 'input_components'";
-const char* kInvalidInputComponentDescription =
+const char kInvalidInputComponentDescription[] =
"Invalid value for 'input_conponents[*].description";
-const char* kInvalidInputComponentLayoutName =
+const char kInvalidInputComponentLayoutName[] =
"Invalid value for 'input_conponents[*].layouts[*]";
-const char* kInvalidInputComponentLayouts =
+const char kInvalidInputComponentLayouts[] =
"Invalid value for 'input_conponents[*].layouts";
-const char* kInvalidInputComponentName =
+const char kInvalidInputComponentName[] =
"Invalid value for 'input_conponents[*].name";
-const char* kInvalidInputComponentShortcutKey =
+const char kInvalidInputComponentShortcutKey[] =
"Invalid value for 'input_conponents[*].shortcutKey";
-const char* kInvalidInputComponentShortcutKeycode =
+const char kInvalidInputComponentShortcutKeycode[] =
"Invalid value for 'input_conponents[*].shortcutKey.keyCode";
-const char* kInvalidInputComponentType =
+const char kInvalidInputComponentType[] =
"Invalid value for 'input_conponents[*].type";
-const char* kInvalidIntent =
+const char kInvalidIntent[] =
"Invalid value for intents[*]";
-const char* kInvalidIntentDisposition =
+const char kInvalidIntentDisposition[] =
"Invalid value for intents[*].disposition";
-const char* kInvalidIntentPath =
+const char kInvalidIntentPath[] =
"Invalid value for intents[*].path";
-const char* kInvalidIntents =
+const char kInvalidIntents[] =
"Invalid value for intents";
-const char* kInvalidIntentType =
+const char kInvalidIntentType[] =
"Invalid value for intents[*].type";
-const char* kInvalidIntentTitle =
+const char kInvalidIntentTitle[] =
"Invalid value for intents[*].title";
-const char* kInvalidIsolation =
+const char kInvalidIsolation[] =
"Invalid value for 'app.isolation'.";
-const char* kInvalidIsolationValue =
+const char kInvalidIsolationValue[] =
"Invalid value for 'app.isolation[*]'.";
-const char* kInvalidJs =
+const char kInvalidJs[] =
"Invalid value for 'content_scripts[*].js[*]'.";
-const char* kInvalidJsList =
+const char kInvalidJsList[] =
"Required value 'content_scripts[*].js' is invalid.";
-const char* kInvalidKey =
+const char kInvalidKey[] =
"Value 'key' is missing or invalid.";
-const char* kInvalidLaunchContainer =
+const char kInvalidLaunchContainer[] =
"Invalid value for 'app.launch.container'.";
-const char* kInvalidLaunchContainerForPlatform =
+const char kInvalidLaunchContainerForPlatform[] =
"platform_app requires 'app.launch.container' == 'panel'.";
-const char* kInvalidLaunchHeight =
+const char kInvalidLaunchHeight[] =
"Invalid value for 'app.launch.height'.";
-const char* kInvalidLaunchHeightContainer =
+const char kInvalidLaunchHeightContainer[] =
"Invalid container type for 'app.launch.height'.";
-const char* kInvalidLaunchLocalPath =
+const char kInvalidLaunchLocalPath[] =
"Invalid value for 'app.launch.local_path'.";
-const char* kInvalidLaunchWebURL =
+const char kInvalidLaunchWebURL[] =
"Invalid value for 'app.launch.web_url'.";
-const char* kInvalidLaunchWidth =
+const char kInvalidLaunchWidth[] =
"Invalid value for 'app.launch.width'.";
-const char* kInvalidLaunchWidthContainer =
+const char kInvalidLaunchWidthContainer[] =
"Invalid container type for 'app.launch.width'.";
-const char* kInvalidManifest =
+const char kInvalidManifest[] =
"Manifest file is invalid.";
-const char* kInvalidManifestVersion =
+const char kInvalidManifestVersion[] =
"Invalid value for 'manifest_version'.";
-const char* kInvalidMatch =
+const char kInvalidMatch[] =
"Invalid value for 'content_scripts[*].matches[*]': *";
-const char* kInvalidMatchCount =
+const char kInvalidMatchCount[] =
"Invalid value for 'content_scripts[*].matches'. There must be at least "
"one match specified.";
-const char* kInvalidMatches =
+const char kInvalidMatches[] =
"Required value 'content_scripts[*].matches' is missing or invalid.";
-const char* kInvalidMinimumChromeVersion =
+const char kInvalidMinimumChromeVersion[] =
"Invalid value for 'minimum_chrome_version'.";
-const char* kInvalidName =
+const char kInvalidName[] =
"Required value 'name' is missing or invalid.";
-const char* kInvalidNaClModules =
+const char kInvalidNaClModules[] =
"Invalid value for 'nacl_modules'.";
-const char* kInvalidNaClModulesPath =
+const char kInvalidNaClModulesPath[] =
"Invalid value for 'nacl_modules[*].path'.";
-const char* kInvalidNaClModulesMIMEType =
+const char kInvalidNaClModulesMIMEType[] =
"Invalid value for 'nacl_modules[*].mime_type'.";
-const char* kInvalidOfflineEnabled =
+const char kInvalidOfflineEnabled[] =
"Invalid value for 'offline_enabled'.";
-const char* kInvalidOmniboxKeyword =
+const char kInvalidOmniboxKeyword[] =
"Invalid value for 'omnibox.keyword'.";
-const char* kInvalidOptionsPage =
+const char kInvalidOptionsPage[] =
"Invalid value for 'options_page'.";
-const char* kInvalidOptionsPageExpectUrlInPackage =
+const char kInvalidOptionsPageExpectUrlInPackage[] =
"Invalid value for 'options_page'. Value must be a relative path.";
-const char* kInvalidOptionsPageInHostedApp =
+const char kInvalidOptionsPageInHostedApp[] =
"Invalid value for 'options_page'. Hosted apps must specify an "
"absolute URL.";
-const char* kInvalidPageAction =
+const char kInvalidPageAction[] =
"Invalid value for 'page_action'.";
-const char* kInvalidPageActionDefaultTitle =
+const char kInvalidPageActionDefaultTitle[] =
"Invalid value for 'default_title'.";
-const char* kInvalidPageActionIconPath =
+const char kInvalidPageActionIconPath[] =
"Invalid value for 'page_action.default_icon'.";
-const char* kInvalidPageActionId =
+const char kInvalidPageActionId[] =
"Required value 'id' is missing or invalid.";
-const char* kInvalidPageActionName =
+const char kInvalidPageActionName[] =
"Invalid value for 'page_action.name'.";
-const char* kInvalidPageActionOldAndNewKeys =
+const char kInvalidPageActionOldAndNewKeys[] =
"Key \"*\" is deprecated. Key \"*\" has the same meaning. You can not "
"use both.";
-const char* kInvalidPageActionPopup =
+const char kInvalidPageActionPopup[] =
"Invalid type for page action popup.";
-const char* kInvalidPageActionPopupHeight =
+const char kInvalidPageActionPopupHeight[] =
"Invalid value for page action popup height [*].";
-const char* kInvalidPageActionPopupPath =
+const char kInvalidPageActionPopupPath[] =
"Invalid value for page action popup path [*].";
-const char* kInvalidPageActionsList =
+const char kInvalidPageActionsList[] =
"Invalid value for 'page_actions'.";
-const char* kInvalidPageActionsListSize =
+const char kInvalidPageActionsListSize[] =
"Invalid value for 'page_actions'. There can be at most one page action.";
-const char* kInvalidPageActionTypeValue =
+const char kInvalidPageActionTypeValue[] =
"Invalid value for 'page_actions[*].type', expected 'tab' or 'permanent'.";
-const char* kInvalidPermission =
+const char kInvalidPermission[] =
"Invalid value for 'permissions[*]'.";
-const char* kInvalidPermissions =
+const char kInvalidPermissions[] =
"Required value 'permissions' is missing or invalid.";
-const char* kInvalidPermissionScheme =
+const char kInvalidPermissionScheme[] =
"Invalid scheme for 'permissions[*]'.";
-const char* kInvalidPlugins =
+const char kInvalidPlugins[] =
"Invalid value for 'plugins'.";
-const char* kInvalidPluginsPath =
+const char kInvalidPluginsPath[] =
"Invalid value for 'plugins[*].path'.";
-const char* kInvalidPluginsPublic =
+const char kInvalidPluginsPublic[] =
"Invalid value for 'plugins[*].public'.";
-const char* kInvalidRequirement =
+const char kInvalidRequirement[] =
"Invalid value for requirement \"*\"";
-const char* kInvalidRequirements =
+const char kInvalidRequirements[] =
"Invalid value for 'requirements'";
-const char* kInvalidRunAt =
+const char kInvalidRunAt[] =
"Invalid value for 'content_scripts[*].run_at'.";
-const char* kInvalidSidebar =
+const char kInvalidSidebar[] =
"Invalid value for 'sidebar'.";
-const char* kInvalidSidebarDefaultIconPath =
+const char kInvalidSidebarDefaultIconPath[] =
"Invalid value for 'sidebar.default_icon'.";
-const char* kInvalidSidebarDefaultPage =
+const char kInvalidSidebarDefaultPage[] =
"Invalid value for 'sidebar.default_page'.";
-const char* kInvalidSidebarDefaultTitle =
+const char kInvalidSidebarDefaultTitle[] =
"Invalid value for 'sidebar.default_title'.";
-const char* kInvalidSignature =
+const char kInvalidSignature[] =
"Value 'signature' is missing or invalid.";
-const char* kInvalidTheme =
+const char kInvalidTheme[] =
"Invalid value for 'theme'.";
-const char* kInvalidThemeColors =
+const char kInvalidThemeColors[] =
"Invalid value for theme colors - colors must be integers";
-const char* kInvalidThemeImages =
+const char kInvalidThemeImages[] =
"Invalid value for theme images - images must be strings.";
-const char* kInvalidThemeImagesMissing =
+const char kInvalidThemeImagesMissing[] =
"An image specified in the theme is missing.";
-const char* kInvalidThemeTints =
+const char kInvalidThemeTints[] =
"Invalid value for theme images - tints must be decimal numbers.";
-const char* kInvalidTts =
+const char kInvalidTts[] =
"Invalid value for 'tts_engine'.";
-const char* kInvalidTtsVoices =
+const char kInvalidTtsVoices[] =
"Invalid value for 'tts_engine.voices'.";
-const char* kInvalidTtsVoicesEventTypes =
+const char kInvalidTtsVoicesEventTypes[] =
"Invalid value for 'tts_engine.voices[*].event_types'.";
-const char* kInvalidTtsVoicesGender =
+const char kInvalidTtsVoicesGender[] =
"Invalid value for 'tts_engine.voices[*].gender'.";
-const char* kInvalidTtsVoicesLang =
+const char kInvalidTtsVoicesLang[] =
"Invalid value for 'tts_engine.voices[*].lang'.";
-const char* kInvalidTtsVoicesVoiceName =
+const char kInvalidTtsVoicesVoiceName[] =
"Invalid value for 'tts_engine.voices[*].voice_name'.";
-const char* kInvalidUpdateURL =
+const char kInvalidUpdateURL[] =
"Invalid value for update url: '[*]'.";
-const char* kInvalidURLPatternError =
+const char kInvalidURLPatternError[] =
"Invalid url pattern '*'";
-const char* kInvalidVersion =
+const char kInvalidVersion[] =
"Required value 'version' is missing or invalid. It must be between 1-4 "
"dot-separated integers each between 0 and 65536.";
-const char* kInvalidWebURL =
+const char kInvalidWebURL[] =
"Invalid value for 'app.urls[*]': *";
-const char* kInvalidWebURLs =
+const char kInvalidWebURLs[] =
"Invalid value for 'app.urls'.";
-const char* kInvalidZipHash =
+const char kInvalidZipHash[] =
"Required key 'zip_hash' is missing or invalid.";
-const char* kLaunchPathAndExtentAreExclusive =
+const char kLaunchPathAndExtentAreExclusive[] =
"The 'app.launch.local_path' and 'app.urls' keys cannot both be set.";
-const char* kLaunchPathAndURLAreExclusive =
+const char kLaunchPathAndURLAreExclusive[] =
"The 'app.launch.local_path' and 'app.launch.web_url' keys cannot "
"both be set.";
-const char* kLaunchURLRequired =
+const char kLaunchURLRequired[] =
"Either 'app.launch.local_path' or 'app.launch.web_url' is required.";
-const char* kLocalesMessagesFileMissing =
+const char kLocalesMessagesFileMissing[] =
"Messages file is missing for locale.";
-const char* kLocalesNoDefaultLocaleSpecified =
+const char kLocalesNoDefaultLocaleSpecified[] =
"Localization used, but default_locale wasn't specified in the manifest.";
-const char* kLocalesNoDefaultMessages =
+const char kLocalesNoDefaultMessages[] =
"Default locale is defined but default data couldn't be loaded.";
-const char* kLocalesNoValidLocaleNamesListed =
+const char kLocalesNoValidLocaleNamesListed[] =
"No valid locale name could be found in _locales directory.";
-const char* kLocalesTreeMissing =
+const char kLocalesTreeMissing[] =
"Default locale was specified, but _locales subtree is missing.";
-const char* kManifestParseError =
+const char kManifestParseError[] =
"Manifest is not valid JSON.";
-const char* kManifestUnreadable =
+const char kManifestUnreadable[] =
"Manifest file is missing or unreadable.";
-const char* kMissingFile =
+const char kMissingFile[] =
"At least one js or css file is required for 'content_scripts[*]'.";
-const char* kMultipleOverrides =
+const char kMultipleOverrides[] =
"An extension cannot override more than one page.";
-const char* kNoWildCardsInPaths =
+const char kNoWildCardsInPaths[] =
"Wildcards are not allowed in extent URL pattern paths.";
-const char* kOneUISurfaceOnly =
+const char kOneUISurfaceOnly[] =
"Only one of 'browser_action', 'page_action', and 'app' can be specified.";
-const char* kPermissionNotAllowed =
+const char kPermissionNotAllowed[] =
"Access to permission '*' denied.";
-const char* kReservedMessageFound =
+const char kReservedMessageFound[] =
"Reserved key * found in message catalog.";
-const char* kSidebarExperimental =
+const char kSidebarExperimental[] =
"You must request the 'experimental' permission in order to use the"
" Sidebar API.";
-const char* kThemesCannotContainExtensions =
+const char kThemesCannotContainExtensions[] =
"A theme cannot contain extensions code.";
#if defined(OS_CHROMEOS)
-const char* kIllegalPlugins =
+const char kIllegalPlugins[] =
"Extensions cannot install plugins on Chrome OS";
#endif
} // namespace extension_manifest_errors
@@ -453,9 +453,9 @@ GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) {
return GURL(GetWebstoreLaunchURL() + "/inlineinstall/detail/" + extension_id);
}
-const char* kGalleryUpdateHttpUrl =
+const char kGalleryUpdateHttpUrl[] =
"http://clients2.google.com/service/update2/crx";
-const char* kGalleryUpdateHttpsUrl =
+const char kGalleryUpdateHttpsUrl[] =
"https://clients2.google.com/service/update2/crx";
GURL GetWebstoreUpdateUrl(bool secure) {
@@ -466,30 +466,30 @@ GURL GetWebstoreUpdateUrl(bool secure) {
return GURL(secure ? kGalleryUpdateHttpsUrl : kGalleryUpdateHttpUrl);
}
-const char* kGalleryBrowsePrefix = "https://chrome.google.com/webstore";
+const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore";
}
namespace extension_filenames {
-const char* kTempExtensionName = "CRX_INSTALL";
+const char kTempExtensionName[] = "CRX_INSTALL";
// The file to write our decoded images to, relative to the extension_path.
-const char* kDecodedImagesFilename = "DECODED_IMAGES";
+const char kDecodedImagesFilename[] = "DECODED_IMAGES";
// The file to write our decoded message catalogs to, relative to the
// extension_path.
-const char* kDecodedMessageCatalogsFilename = "DECODED_MESSAGE_CATALOGS";
+const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS";
}
namespace extension_misc {
-const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno";
-const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb";
-const char* kCloudPrintAppId = "mfehgcgbbipciphmccgaenjidiccnmng";
-const char* kAppsPromoHistogram = "Extensions.AppsPromo";
-const char* kAppLaunchHistogram = "Extensions.AppLaunch";
+const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno";
+const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb";
+const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng";
+const char kAppsPromoHistogram[] = "Extensions.AppsPromo";
+const char kAppLaunchHistogram[] = "Extensions.AppLaunch";
#if defined(OS_CHROMEOS)
-const char* kAccessExtensionPath =
+const char kAccessExtensionPath[] =
"/usr/share/chromeos-assets/accessibility/extensions";
-const char* kChromeVoxDirectoryName = "access_chromevox";
+const char kChromeVoxDirectoryName[] = "access_chromevox";
#endif
}
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index ecdb13d..169e97e 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -13,275 +13,275 @@
// Keys used in JSON representation of extensions.
namespace extension_manifest_keys {
- extern const char* kAllFrames;
- extern const char* kAltKey;
- extern const char* kApp;
- extern const char* kBackground;
- extern const char* kBrowserAction;
- extern const char* kBrowseURLs;
- extern const char* kChromeURLOverrides;
- extern const char* kContentScripts;
- extern const char* kContentSecurityPolicy;
- extern const char* kConvertedFromUserScript;
- extern const char* kCss;
- extern const char* kCtrlKey;
- extern const char* kCurrentLocale;
- extern const char* kDefaultLocale;
- extern const char* kDescription;
- extern const char* kDevToolsPage;
- extern const char* kExcludeGlobs;
- extern const char* kExcludeMatches;
- extern const char* kFileFilters;
- extern const char* kFileBrowserHandlers;
- extern const char* kHomepageURL;
- extern const char* kIcons;
- extern const char* kId;
- extern const char* kIncognito;
- extern const char* kIncludeGlobs;
- extern const char* kInputComponents;
- extern const char* kIntents;
- extern const char* kIntentType;
- extern const char* kIntentPath;
- extern const char* kIntentTitle;
- extern const char* kIntentDisposition;
- extern const char* kIsolation;
- extern const char* kJs;
- extern const char* kKeycode;
- extern const char* kLanguage;
- extern const char* kLaunch;
- extern const char* kLaunchContainer;
- extern const char* kLaunchHeight;
- extern const char* kLaunchLocalPath;
- extern const char* kLaunchWebURL;
- extern const char* kLaunchWidth;
- extern const char* kLayouts;
- extern const char* kManifestVersion;
- extern const char* kMatches;
- extern const char* kMinimumChromeVersion;
- extern const char* kNaClModules;
- extern const char* kNaClModulesMIMEType;
- extern const char* kNaClModulesPath;
- extern const char* kName;
- extern const char* kOfflineEnabled;
- extern const char* kOmnibox;
- extern const char* kOmniboxKeyword;
- extern const char* kOptionalPermissions;
- extern const char* kOptionsPage;
- extern const char* kPageAction;
- extern const char* kPageActionDefaultIcon;
- extern const char* kPageActionDefaultPopup;
- extern const char* kPageActionDefaultTitle;
- extern const char* kPageActionIcons;
- extern const char* kPageActionId;
- extern const char* kPageActionPopup;
- extern const char* kPageActionPopupHeight;
- extern const char* kPageActionPopupPath;
- extern const char* kPageActions;
- extern const char* kPermissions;
- extern const char* kPlatformApp;
- extern const char* kPlugins;
- extern const char* kPluginsPath;
- extern const char* kPluginsPublic;
- extern const char* kPublicKey;
- extern const char* kRequirements;
- extern const char* kRunAt;
- extern const char* kShiftKey;
- extern const char* kShortcutKey;
- extern const char* kSidebar;
- extern const char* kSidebarDefaultIcon;
- extern const char* kSidebarDefaultPage;
- extern const char* kSidebarDefaultTitle;
- extern const char* kSignature;
- extern const char* kTheme;
- extern const char* kThemeColors;
- extern const char* kThemeDisplayProperties;
- extern const char* kThemeImages;
- extern const char* kThemeTints;
- extern const char* kTtsEngine;
- extern const char* kTtsGenderFemale;
- extern const char* kTtsGenderMale;
- extern const char* kTtsVoices;
- extern const char* kTtsVoicesEventTypeEnd;
- extern const char* kTtsVoicesEventTypeError;
- extern const char* kTtsVoicesEventTypeMarker;
- extern const char* kTtsVoicesEventTypeSentence;
- extern const char* kTtsVoicesEventTypeStart;
- extern const char* kTtsVoicesEventTypeWord;
- extern const char* kTtsVoicesEventTypes;
- extern const char* kTtsVoicesGender;
- extern const char* kTtsVoicesLang;
- extern const char* kTtsVoicesVoiceName;
- extern const char* kType;
- extern const char* kUpdateURL;
- extern const char* kVersion;
- extern const char* kWebURLs;
+ extern const char kAllFrames[];
+ extern const char kAltKey[];
+ extern const char kApp[];
+ extern const char kBackground[];
+ extern const char kBrowserAction[];
+ extern const char kBrowseURLs[];
+ extern const char kChromeURLOverrides[];
+ extern const char kContentScripts[];
+ extern const char kContentSecurityPolicy[];
+ extern const char kConvertedFromUserScript[];
+ extern const char kCss[];
+ extern const char kCtrlKey[];
+ extern const char kCurrentLocale[];
+ extern const char kDefaultLocale[];
+ extern const char kDescription[];
+ extern const char kDevToolsPage[];
+ extern const char kExcludeGlobs[];
+ extern const char kExcludeMatches[];
+ extern const char kFileFilters[];
+ extern const char kFileBrowserHandlers[];
+ extern const char kHomepageURL[];
+ extern const char kIcons[];
+ extern const char kId[];
+ extern const char kIncognito[];
+ extern const char kIncludeGlobs[];
+ extern const char kInputComponents[];
+ extern const char kIntents[];
+ extern const char kIntentType[];
+ extern const char kIntentPath[];
+ extern const char kIntentTitle[];
+ extern const char kIntentDisposition[];
+ extern const char kIsolation[];
+ extern const char kJs[];
+ extern const char kKeycode[];
+ extern const char kLanguage[];
+ extern const char kLaunch[];
+ extern const char kLaunchContainer[];
+ extern const char kLaunchHeight[];
+ extern const char kLaunchLocalPath[];
+ extern const char kLaunchWebURL[];
+ extern const char kLaunchWidth[];
+ extern const char kLayouts[];
+ extern const char kManifestVersion[];
+ extern const char kMatches[];
+ extern const char kMinimumChromeVersion[];
+ extern const char kNaClModules[];
+ extern const char kNaClModulesMIMEType[];
+ extern const char kNaClModulesPath[];
+ extern const char kName[];
+ extern const char kOfflineEnabled[];
+ extern const char kOmnibox[];
+ extern const char kOmniboxKeyword[];
+ extern const char kOptionalPermissions[];
+ extern const char kOptionsPage[];
+ extern const char kPageAction[];
+ extern const char kPageActionDefaultIcon[];
+ extern const char kPageActionDefaultPopup[];
+ extern const char kPageActionDefaultTitle[];
+ extern const char kPageActionIcons[];
+ extern const char kPageActionId[];
+ extern const char kPageActionPopup[];
+ extern const char kPageActionPopupHeight[];
+ extern const char kPageActionPopupPath[];
+ extern const char kPageActions[];
+ extern const char kPermissions[];
+ extern const char kPlatformApp[];
+ extern const char kPlugins[];
+ extern const char kPluginsPath[];
+ extern const char kPluginsPublic[];
+ extern const char kPublicKey[];
+ extern const char kRequirements[];
+ extern const char kRunAt[];
+ extern const char kShiftKey[];
+ extern const char kShortcutKey[];
+ extern const char kSidebar[];
+ extern const char kSidebarDefaultIcon[];
+ extern const char kSidebarDefaultPage[];
+ extern const char kSidebarDefaultTitle[];
+ extern const char kSignature[];
+ extern const char kTheme[];
+ extern const char kThemeColors[];
+ extern const char kThemeDisplayProperties[];
+ extern const char kThemeImages[];
+ extern const char kThemeTints[];
+ extern const char kTtsEngine[];
+ extern const char kTtsGenderFemale[];
+ extern const char kTtsGenderMale[];
+ extern const char kTtsVoices[];
+ extern const char kTtsVoicesEventTypeEnd[];
+ extern const char kTtsVoicesEventTypeError[];
+ extern const char kTtsVoicesEventTypeMarker[];
+ extern const char kTtsVoicesEventTypeSentence[];
+ extern const char kTtsVoicesEventTypeStart[];
+ extern const char kTtsVoicesEventTypeWord[];
+ extern const char kTtsVoicesEventTypes[];
+ extern const char kTtsVoicesGender[];
+ extern const char kTtsVoicesLang[];
+ extern const char kTtsVoicesVoiceName[];
+ extern const char kType[];
+ extern const char kUpdateURL[];
+ extern const char kVersion[];
+ extern const char kWebURLs[];
} // namespace extension_manifest_keys
// Some values expected in manifests.
namespace extension_manifest_values {
- extern const char* kIncognitoSplit;
- extern const char* kIncognitoSpanning;
- extern const char* kIntentDispositionWindow;
- extern const char* kIntentDispositionInline;
- extern const char* kIsolatedStorage;
- extern const char* kLaunchContainerPanel;
- extern const char* kLaunchContainerTab;
- extern const char* kLaunchContainerWindow;
- extern const char* kPageActionTypePermanent;
- extern const char* kPageActionTypeTab;
- extern const char* kRunAtDocumentEnd;
- extern const char* kRunAtDocumentIdle;
- extern const char* kRunAtDocumentStart;
+ extern const char kIncognitoSplit[];
+ extern const char kIncognitoSpanning[];
+ extern const char kIntentDispositionWindow[];
+ extern const char kIntentDispositionInline[];
+ extern const char kIsolatedStorage[];
+ extern const char kLaunchContainerPanel[];
+ extern const char kLaunchContainerTab[];
+ extern const char kLaunchContainerWindow[];
+ extern const char kPageActionTypePermanent[];
+ extern const char kPageActionTypeTab[];
+ extern const char kRunAtDocumentEnd[];
+ extern const char kRunAtDocumentIdle[];
+ extern const char kRunAtDocumentStart[];
} // namespace extension_manifest_values
// Error messages returned from Extension::InitFromValue().
namespace extension_manifest_errors {
- extern const char* kAppsNotEnabled;
- extern const char* kBackgroundPermissionNeeded;
- extern const char* kCannotAccessPage;
- extern const char* kCannotChangeExtensionID;
- extern const char* kCannotClaimAllHostsInExtent;
- extern const char* kCannotClaimAllURLsInExtent;
- extern const char* kCannotScriptGallery;
- extern const char* kCannotUninstallManagedExtension;
- extern const char* kChromeVersionTooLow;
- extern const char* kDevToolsExperimental;
- extern const char* kDisabledByPolicy;
- extern const char* kExperimentalFlagRequired;
- extern const char* kExpectString;
- extern const char* kHostedAppsCannotIncludeExtensionFeatures;
- extern const char* kInvalidAllFrames;
- extern const char* kInvalidBackground;
- extern const char* kInvalidBackgroundInHostedApp;
- extern const char* kInvalidBrowserAction;
- extern const char* kInvalidBrowseURL;
- extern const char* kInvalidBrowseURLs;
- extern const char* kInvalidChromeURLOverrides;
- extern const char* kInvalidContentScript;
- extern const char* kInvalidContentScriptsList;
- extern const char* kInvalidContentSecurityPolicy;
- extern const char* kInvalidCss;
- extern const char* kInvalidCssList;
- extern const char* kInvalidDefaultLocale;
- extern const char* kInvalidDescription;
- extern const char* kInvalidDevToolsPage;
- extern const char* kInvalidExcludeMatch;
- extern const char* kInvalidExcludeMatches;
- extern const char* kInvalidFileBrowserHandler;
- extern const char* kInvalidFileFiltersList;
- extern const char* kInvalidFileFilterValue;
- extern const char* kInvalidGlob;
- extern const char* kInvalidGlobList;
- extern const char* kInvalidHomepageURL;
- extern const char* kInvalidIconPath;
- extern const char* kInvalidIcons;
- extern const char* kInvalidIncognitoBehavior;
- extern const char* kInvalidInputComponents;
- extern const char* kInvalidInputComponentDescription;
- extern const char* kInvalidInputComponentLayoutName;
- extern const char* kInvalidInputComponentLayouts;
- extern const char* kInvalidInputComponentName;
- extern const char* kInvalidInputComponentShortcutKey;
- extern const char* kInvalidInputComponentShortcutKeycode;
- extern const char* kInvalidInputComponentType;
- extern const char* kInvalidIntent;
- extern const char* kInvalidIntentDisposition;
- extern const char* kInvalidIntentPath;
- extern const char* kInvalidIntents;
- extern const char* kInvalidIntentType;
- extern const char* kInvalidIntentTitle;
- extern const char* kInvalidIsolation;
- extern const char* kInvalidIsolationValue;
- extern const char* kInvalidJs;
- extern const char* kInvalidJsList;
- extern const char* kInvalidKey;
- extern const char* kInvalidLaunchContainer;
- extern const char* kInvalidLaunchContainerForPlatform;
- extern const char* kInvalidLaunchHeight;
- extern const char* kInvalidLaunchHeightContainer;
- extern const char* kInvalidLaunchLocalPath;
- extern const char* kInvalidLaunchWebURL;
- extern const char* kInvalidLaunchWidth;
- extern const char* kInvalidLaunchWidthContainer;
- extern const char* kInvalidManifest;
- extern const char* kInvalidManifestVersion;
- extern const char* kInvalidMatch;
- extern const char* kInvalidMatchCount;
- extern const char* kInvalidMatches;
- extern const char* kInvalidMinimumChromeVersion;
- extern const char* kInvalidNaClModules;
- extern const char* kInvalidNaClModulesMIMEType;
- extern const char* kInvalidNaClModulesPath;
- extern const char* kInvalidName;
- extern const char* kInvalidOfflineEnabled;
- extern const char* kInvalidOmniboxKeyword;
- extern const char* kInvalidOptionsPage;
- extern const char* kInvalidOptionsPageExpectUrlInPackage;
- extern const char* kInvalidOptionsPageInHostedApp;
- extern const char* kInvalidPageAction;
- extern const char* kInvalidPageActionDefaultTitle;
- extern const char* kInvalidPageActionIconPath;
- extern const char* kInvalidPageActionId;
- extern const char* kInvalidPageActionName;
- extern const char* kInvalidPageActionOldAndNewKeys;
- extern const char* kInvalidPageActionPopup;
- extern const char* kInvalidPageActionPopupHeight;
- extern const char* kInvalidPageActionPopupPath;
- extern const char* kInvalidPageActionsList;
- extern const char* kInvalidPageActionsListSize;
- extern const char* kInvalidPageActionTypeValue;
- extern const char* kInvalidPermission;
- extern const char* kInvalidPermissions;
- extern const char* kInvalidPermissionScheme;
- extern const char* kInvalidPlugins;
- extern const char* kInvalidPluginsPath;
- extern const char* kInvalidPluginsPublic;
- extern const char* kInvalidRequirement;
- extern const char* kInvalidRequirements;
- extern const char* kInvalidRunAt;
- extern const char* kInvalidSidebar;
- extern const char* kInvalidSidebarDefaultIconPath;
- extern const char* kInvalidSidebarDefaultPage;
- extern const char* kInvalidSidebarDefaultTitle;
- extern const char* kInvalidSignature;
- extern const char* kInvalidTheme;
- extern const char* kInvalidThemeColors;
- extern const char* kInvalidThemeImages;
- extern const char* kInvalidThemeImagesMissing;
- extern const char* kInvalidThemeTints;
- extern const char* kInvalidTts;
- extern const char* kInvalidTtsVoices;
- extern const char* kInvalidTtsVoicesEventTypes;
- extern const char* kInvalidTtsVoicesGender;
- extern const char* kInvalidTtsVoicesLang;
- extern const char* kInvalidTtsVoicesVoiceName;
- extern const char* kInvalidUpdateURL;
- extern const char* kInvalidURLPatternError;
- extern const char* kInvalidVersion;
- extern const char* kInvalidWebURL;
- extern const char* kInvalidWebURLs;
- extern const char* kInvalidZipHash;
- extern const char* kLaunchPathAndExtentAreExclusive;
- extern const char* kLaunchPathAndURLAreExclusive;
- extern const char* kLaunchURLRequired;
- extern const char* kLocalesMessagesFileMissing;
- extern const char* kLocalesNoDefaultLocaleSpecified;
- extern const char* kLocalesNoDefaultMessages;
- extern const char* kLocalesNoValidLocaleNamesListed;
- extern const char* kLocalesTreeMissing;
- extern const char* kManifestParseError;
- extern const char* kManifestUnreadable;
- extern const char* kMissingFile;
- extern const char* kMultipleOverrides;
- extern const char* kNoWildCardsInPaths;
- extern const char* kPermissionNotAllowed;
- extern const char* kOneUISurfaceOnly;
- extern const char* kReservedMessageFound;
- extern const char* kSidebarExperimental;
- extern const char* kThemesCannotContainExtensions;
- extern const char* kWebContentMustBeEnabled;
+ extern const char kAppsNotEnabled[];
+ extern const char kBackgroundPermissionNeeded[];
+ extern const char kCannotAccessPage[];
+ extern const char kCannotChangeExtensionID[];
+ extern const char kCannotClaimAllHostsInExtent[];
+ extern const char kCannotClaimAllURLsInExtent[];
+ extern const char kCannotScriptGallery[];
+ extern const char kCannotUninstallManagedExtension[];
+ extern const char kChromeVersionTooLow[];
+ extern const char kDevToolsExperimental[];
+ extern const char kDisabledByPolicy[];
+ extern const char kExperimentalFlagRequired[];
+ extern const char kExpectString[];
+ extern const char kHostedAppsCannotIncludeExtensionFeatures[];
+ extern const char kInvalidAllFrames[];
+ extern const char kInvalidBackground[];
+ extern const char kInvalidBackgroundInHostedApp[];
+ extern const char kInvalidBrowserAction[];
+ extern const char kInvalidBrowseURL[];
+ extern const char kInvalidBrowseURLs[];
+ extern const char kInvalidChromeURLOverrides[];
+ extern const char kInvalidContentScript[];
+ extern const char kInvalidContentScriptsList[];
+ extern const char kInvalidContentSecurityPolicy[];
+ extern const char kInvalidCss[];
+ extern const char kInvalidCssList[];
+ extern const char kInvalidDefaultLocale[];
+ extern const char kInvalidDescription[];
+ extern const char kInvalidDevToolsPage[];
+ extern const char kInvalidExcludeMatch[];
+ extern const char kInvalidExcludeMatches[];
+ extern const char kInvalidFileBrowserHandler[];
+ extern const char kInvalidFileFiltersList[];
+ extern const char kInvalidFileFilterValue[];
+ extern const char kInvalidGlob[];
+ extern const char kInvalidGlobList[];
+ extern const char kInvalidHomepageURL[];
+ extern const char kInvalidIconPath[];
+ extern const char kInvalidIcons[];
+ extern const char kInvalidIncognitoBehavior[];
+ extern const char kInvalidInputComponents[];
+ extern const char kInvalidInputComponentDescription[];
+ extern const char kInvalidInputComponentLayoutName[];
+ extern const char kInvalidInputComponentLayouts[];
+ extern const char kInvalidInputComponentName[];
+ extern const char kInvalidInputComponentShortcutKey[];
+ extern const char kInvalidInputComponentShortcutKeycode[];
+ extern const char kInvalidInputComponentType[];
+ extern const char kInvalidIntent[];
+ extern const char kInvalidIntentDisposition[];
+ extern const char kInvalidIntentPath[];
+ extern const char kInvalidIntents[];
+ extern const char kInvalidIntentType[];
+ extern const char kInvalidIntentTitle[];
+ extern const char kInvalidIsolation[];
+ extern const char kInvalidIsolationValue[];
+ extern const char kInvalidJs[];
+ extern const char kInvalidJsList[];
+ extern const char kInvalidKey[];
+ extern const char kInvalidLaunchContainer[];
+ extern const char kInvalidLaunchContainerForPlatform[];
+ extern const char kInvalidLaunchHeight[];
+ extern const char kInvalidLaunchHeightContainer[];
+ extern const char kInvalidLaunchLocalPath[];
+ extern const char kInvalidLaunchWebURL[];
+ extern const char kInvalidLaunchWidth[];
+ extern const char kInvalidLaunchWidthContainer[];
+ extern const char kInvalidManifest[];
+ extern const char kInvalidManifestVersion[];
+ extern const char kInvalidMatch[];
+ extern const char kInvalidMatchCount[];
+ extern const char kInvalidMatches[];
+ extern const char kInvalidMinimumChromeVersion[];
+ extern const char kInvalidNaClModules[];
+ extern const char kInvalidNaClModulesMIMEType[];
+ extern const char kInvalidNaClModulesPath[];
+ extern const char kInvalidName[];
+ extern const char kInvalidOfflineEnabled[];
+ extern const char kInvalidOmniboxKeyword[];
+ extern const char kInvalidOptionsPage[];
+ extern const char kInvalidOptionsPageExpectUrlInPackage[];
+ extern const char kInvalidOptionsPageInHostedApp[];
+ extern const char kInvalidPageAction[];
+ extern const char kInvalidPageActionDefaultTitle[];
+ extern const char kInvalidPageActionIconPath[];
+ extern const char kInvalidPageActionId[];
+ extern const char kInvalidPageActionName[];
+ extern const char kInvalidPageActionOldAndNewKeys[];
+ extern const char kInvalidPageActionPopup[];
+ extern const char kInvalidPageActionPopupHeight[];
+ extern const char kInvalidPageActionPopupPath[];
+ extern const char kInvalidPageActionsList[];
+ extern const char kInvalidPageActionsListSize[];
+ extern const char kInvalidPageActionTypeValue[];
+ extern const char kInvalidPermission[];
+ extern const char kInvalidPermissions[];
+ extern const char kInvalidPermissionScheme[];
+ extern const char kInvalidPlugins[];
+ extern const char kInvalidPluginsPath[];
+ extern const char kInvalidPluginsPublic[];
+ extern const char kInvalidRequirement[];
+ extern const char kInvalidRequirements[];
+ extern const char kInvalidRunAt[];
+ extern const char kInvalidSidebar[];
+ extern const char kInvalidSidebarDefaultIconPath[];
+ extern const char kInvalidSidebarDefaultPage[];
+ extern const char kInvalidSidebarDefaultTitle[];
+ extern const char kInvalidSignature[];
+ extern const char kInvalidTheme[];
+ extern const char kInvalidThemeColors[];
+ extern const char kInvalidThemeImages[];
+ extern const char kInvalidThemeImagesMissing[];
+ extern const char kInvalidThemeTints[];
+ extern const char kInvalidTts[];
+ extern const char kInvalidTtsVoices[];
+ extern const char kInvalidTtsVoicesEventTypes[];
+ extern const char kInvalidTtsVoicesGender[];
+ extern const char kInvalidTtsVoicesLang[];
+ extern const char kInvalidTtsVoicesVoiceName[];
+ extern const char kInvalidUpdateURL[];
+ extern const char kInvalidURLPatternError[];
+ extern const char kInvalidVersion[];
+ extern const char kInvalidWebURL[];
+ extern const char kInvalidWebURLs[];
+ extern const char kInvalidZipHash[];
+ extern const char kLaunchPathAndExtentAreExclusive[];
+ extern const char kLaunchPathAndURLAreExclusive[];
+ extern const char kLaunchURLRequired[];
+ extern const char kLocalesMessagesFileMissing[];
+ extern const char kLocalesNoDefaultLocaleSpecified[];
+ extern const char kLocalesNoDefaultMessages[];
+ extern const char kLocalesNoValidLocaleNamesListed[];
+ extern const char kLocalesTreeMissing[];
+ extern const char kManifestParseError[];
+ extern const char kManifestUnreadable[];
+ extern const char kMissingFile[];
+ extern const char kMultipleOverrides[];
+ extern const char kNoWildCardsInPaths[];
+ extern const char kPermissionNotAllowed[];
+ extern const char kOneUISurfaceOnly[];
+ extern const char kReservedMessageFound[];
+ extern const char kSidebarExperimental[];
+ extern const char kThemesCannotContainExtensions[];
+ extern const char kWebContentMustBeEnabled[];
#if defined(OS_CHROMEOS)
- extern const char* kIllegalPlugins;
+ extern const char kIllegalPlugins[];
#endif
} // namespace extension_manifest_errors
@@ -309,33 +309,33 @@ namespace extension_urls {
// The greatest common prefixes of the main extensions gallery's browse and
// download URLs.
- extern const char* kGalleryBrowsePrefix;
+ extern const char kGalleryBrowsePrefix[];
} // namespace extension_urls
namespace extension_filenames {
// The name of a temporary directory to install an extension into for
// validation before finalizing install.
- extern const char* kTempExtensionName;
+ extern const char kTempExtensionName[];
// The file to write our decoded images to, relative to the extension_path.
- extern const char* kDecodedImagesFilename;
+ extern const char kDecodedImagesFilename[];
// The file to write our decoded message catalogs to, relative to the
// extension_path.
- extern const char* kDecodedMessageCatalogsFilename;
+ extern const char kDecodedMessageCatalogsFilename[];
}
namespace extension_misc {
const int kUnknownWindowId = -1;
// The extension id of the bookmark manager.
- extern const char* kBookmarkManagerId;
+ extern const char kBookmarkManagerId[];
// The extension id of the Web Store component application.
- extern const char* kWebStoreAppId;
+ extern const char kWebStoreAppId[];
// The extension id of the Cloud Print component application.
- extern const char* kCloudPrintAppId;
+ extern const char kCloudPrintAppId[];
// Note: this structure is an ASN.1 which encodes the algorithm used
// with its parameters. This is defined in PKCS #1 v2.1 (RFC 3447).
@@ -354,7 +354,7 @@ namespace extension_misc {
};
// The name of the apps promo histogram.
- extern const char* kAppsPromoHistogram;
+ extern const char kAppsPromoHistogram[];
// The buckets used in the apps promo histogram.
enum AppsPromoBuckets {
@@ -367,7 +367,7 @@ namespace extension_misc {
};
// The name of the app launch histogram.
- extern const char* kAppLaunchHistogram;
+ extern const char kAppLaunchHistogram[];
// The buckets used for app launches.
enum AppLaunchBucket {
@@ -434,8 +434,8 @@ namespace extension_misc {
#if defined(OS_CHROMEOS)
// The directory path on a ChromeOS device where accessibility extensions are
// stored.
- extern const char* kAccessExtensionPath;
- extern const char* kChromeVoxDirectoryName;
+ extern const char kAccessExtensionPath[];
+ extern const char kChromeVoxDirectoryName[];
#endif
// What causes an extension to be installed? Used in histograms, so don't
diff --git a/chrome/common/extensions/extension_l10n_util_unittest.cc b/chrome/common/extensions/extension_l10n_util_unittest.cc
index bedbd52..9d4f868 100644
--- a/chrome/common/extensions/extension_l10n_util_unittest.cc
+++ b/chrome/common/extensions/extension_l10n_util_unittest.cc
@@ -257,7 +257,7 @@ TEST(ExtensionL10nUtil, LocalizeEmptyManifest) {
EXPECT_FALSE(
extension_l10n_util::LocalizeManifest(*messages, &manifest, &error));
- EXPECT_EQ(errors::kInvalidName, error);
+ EXPECT_EQ(std::string(errors::kInvalidName), error);
}
TEST(ExtensionL10nUtil, LocalizeManifestWithoutNameMsgAndEmptyDescription) {
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 4eac813..cd3f5f5 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -933,7 +933,7 @@ TEST_F(ExtensionManifestTest, FileManagerURLOverride) {
#if defined(FILE_MANAGER_EXTENSION)
EXPECT_EQ("", error);
#else
- EXPECT_EQ(errors::kInvalidChromeURLOverrides, error);
+ EXPECT_EQ(std::string(errors::kInvalidChromeURLOverrides), error);
#endif
// Extensions of other types can't ovverride chrome://files/ URL.
diff --git a/chrome/common/extensions/extension_unpacker_unittest.cc b/chrome/common/extensions/extension_unpacker_unittest.cc
index e86007b..c14df0c 100644
--- a/chrome/common/extensions/extension_unpacker_unittest.cc
+++ b/chrome/common/extensions/extension_unpacker_unittest.cc
@@ -48,19 +48,22 @@ public:
TEST_F(ExtensionUnpackerTest, EmptyDefaultLocale) {
SetupUnpacker("empty_default_locale.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kInvalidDefaultLocale, unpacker_->error_message());
+ EXPECT_EQ(std::string(errors::kInvalidDefaultLocale),
+ unpacker_->error_message());
}
TEST_F(ExtensionUnpackerTest, HasDefaultLocaleMissingLocalesFolder) {
SetupUnpacker("has_default_missing_locales.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kLocalesTreeMissing, unpacker_->error_message());
+ EXPECT_EQ(std::string(errors::kLocalesTreeMissing),
+ unpacker_->error_message());
}
TEST_F(ExtensionUnpackerTest, InvalidDefaultLocale) {
SetupUnpacker("invalid_default_locale.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kInvalidDefaultLocale, unpacker_->error_message());
+ EXPECT_EQ(std::string(errors::kInvalidDefaultLocale),
+ unpacker_->error_message());
}
TEST_F(ExtensionUnpackerTest, InvalidMessagesFile) {
@@ -74,13 +77,14 @@ TEST_F(ExtensionUnpackerTest, InvalidMessagesFile) {
TEST_F(ExtensionUnpackerTest, MissingDefaultData) {
SetupUnpacker("missing_default_data.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kLocalesNoDefaultMessages, unpacker_->error_message());
+ EXPECT_EQ(std::string(errors::kLocalesNoDefaultMessages),
+ unpacker_->error_message());
}
TEST_F(ExtensionUnpackerTest, MissingDefaultLocaleHasLocalesFolder) {
SetupUnpacker("missing_default_has_locales.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kLocalesNoDefaultLocaleSpecified,
+ EXPECT_EQ(std::string(errors::kLocalesNoDefaultLocaleSpecified),
unpacker_->error_message());
}
@@ -95,7 +99,8 @@ TEST_F(ExtensionUnpackerTest, MissingMessagesFile) {
TEST_F(ExtensionUnpackerTest, NoLocaleData) {
SetupUnpacker("no_locale_data.crx");
EXPECT_FALSE(unpacker_->Run());
- EXPECT_EQ(errors::kLocalesNoDefaultMessages, unpacker_->error_message());
+ EXPECT_EQ(std::string(errors::kLocalesNoDefaultMessages),
+ unpacker_->error_message());
}
TEST_F(ExtensionUnpackerTest, GoodL10n) {