Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5321)

Unified Diff: chrome/common/extensions/api/extension_action/script_badge_handler.cc

Issue 22470007: Add a "key" entry to InstallWarnings, remove InstallWarning::Format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_infrastructure
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/extension_action/script_badge_handler.cc
diff --git a/chrome/common/extensions/api/extension_action/script_badge_handler.cc b/chrome/common/extensions/api/extension_action/script_badge_handler.cc
index e58f89a8c98ff985c0fa0ec91f7a4eb1da62b805..46fb0a2efa707ceed986c651af2a312550642fb4 100644
--- a/chrome/common/extensions/api/extension_action/script_badge_handler.cc
+++ b/chrome/common/extensions/api/extension_action/script_badge_handler.cc
@@ -45,8 +45,7 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
// going to have any effect.
if (!FeatureSwitch::script_badges()->IsEnabled()) {
extension->AddInstallWarning(
- InstallWarning(InstallWarning::FORMAT_TEXT,
- errors::kScriptBadgeRequiresFlag));
+ InstallWarning(keys::kScriptBadge, errors::kScriptBadgeRequiresFlag));
}
const base::DictionaryValue* dict = NULL;
@@ -68,13 +67,15 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
if (!action_info->default_title.empty()) {
extension->AddInstallWarning(
- InstallWarning(InstallWarning::FORMAT_TEXT,
+ InstallWarning(keys::kScriptBadge,
+ keys::kPageActionDefaultTitle,
errors::kScriptBadgeTitleIgnored));
}
if (!action_info->default_icon.empty()) {
extension->AddInstallWarning(
- InstallWarning(InstallWarning::FORMAT_TEXT,
+ InstallWarning(keys::kScriptBadge,
+ keys::kPageActionDefaultIcon,
errors::kScriptBadgeIconIgnored));
}

Powered by Google App Engine
This is Rietveld 408576698