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

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

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 17f1c10e30aea9dbe61149fff1a85deb9670b96d..c01e0720fa8233b1c27d12c5948a99108ed48618 100644
--- a/chrome/common/extensions/api/extension_action/script_badge_handler.cc
+++ b/chrome/common/extensions/api/extension_action/script_badge_handler.cc
@@ -13,6 +13,7 @@
#include "chrome/common/extensions/feature_switch.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handler_helpers.h"
+#include "extensions/common/install_warning.h"
namespace errors = extension_manifest_errors;
@@ -39,8 +40,8 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
// going to have any effect.
if (!FeatureSwitch::script_badges()->IsEnabled()) {
extension->AddInstallWarning(
- Extension::InstallWarning(Extension::InstallWarning::FORMAT_TEXT,
- errors::kScriptBadgeRequiresFlag));
+ InstallWarning(InstallWarning::FORMAT_TEXT,
+ errors::kScriptBadgeRequiresFlag));
}
const DictionaryValue* dict = NULL;
@@ -64,14 +65,14 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
if (!action_info->default_title.empty()) {
extension->AddInstallWarning(
- Extension::InstallWarning(Extension::InstallWarning::FORMAT_TEXT,
- errors::kScriptBadgeTitleIgnored));
+ InstallWarning(InstallWarning::FORMAT_TEXT,
+ errors::kScriptBadgeTitleIgnored));
}
if (!action_info->default_icon.empty()) {
extension->AddInstallWarning(
- Extension::InstallWarning(Extension::InstallWarning::FORMAT_TEXT,
- errors::kScriptBadgeIconIgnored));
+ InstallWarning(InstallWarning::FORMAT_TEXT,
+ errors::kScriptBadgeIconIgnored));
}
SetActionInfoDefaults(extension, action_info.get());
@@ -79,8 +80,8 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
return true;
}
-bool ScriptBadgeHandler::AlwaysParseForType(Extension::Type type) {
- return type == Extension::TYPE_EXTENSION;
+bool ScriptBadgeHandler::AlwaysParseForType(Manifest::Type type) {
+ return type == Manifest::TYPE_EXTENSION;
}
void ScriptBadgeHandler::SetActionInfoDefaults(const Extension* extension,

Powered by Google App Engine
This is Rietveld 408576698