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

Unified Diff: chrome/browser/extensions/api/context_menu/context_menu_api.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 years, 1 month 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/browser/extensions/api/context_menu/context_menu_api.cc
diff --git a/chrome/browser/extensions/api/context_menu/context_menu_api.cc b/chrome/browser/extensions/api/context_menu/context_menu_api.cc
index 39e3da48ded37c343b51ff144a1de7bf561f794d..0d98897eea73abe3632456235e1d584a0cb64312 100644
--- a/chrome/browser/extensions/api/context_menu/context_menu_api.cc
+++ b/chrome/browser/extensions/api/context_menu/context_menu_api.cc
@@ -6,15 +6,17 @@
#include <string>
-#include "base/values.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/menu_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/context_menus.h"
-#include "chrome/common/extensions/extension_error_utils.h"
-#include "chrome/common/extensions/url_pattern_set.h"
+#include "extensions/common/error_utils.h"
+#include "extensions/common/url_pattern_set.h"
+
+using extensions::ErrorUtils;
namespace {
@@ -128,7 +130,7 @@ extensions::MenuItem* GetParent(extensions::MenuItem::Id parent_id,
std::string* error) {
extensions::MenuItem* parent = menu_manager->GetItemById(parent_id);
if (!parent) {
- *error = ExtensionErrorUtils::FormatErrorMessage(
+ *error = ErrorUtils::FormatErrorMessage(
kCannotFindItemError, GetIDString(parent_id));
return NULL;
}
@@ -175,7 +177,7 @@ bool CreateContextMenuFunction::RunImpl() {
MenuManager* menu_manager = profile()->GetExtensionService()->menu_manager();
if (menu_manager->GetItemById(id)) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(kDuplicateIDError,
+ error_ = ErrorUtils::FormatErrorMessage(kDuplicateIDError,
GetIDString(id));
return false;
}
@@ -264,7 +266,7 @@ bool UpdateContextMenuFunction::RunImpl() {
MenuManager* manager = service->menu_manager();
MenuItem* item = manager->GetItemById(item_id);
if (!item || item->extension_id() != extension_id()) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(
+ error_ = ErrorUtils::FormatErrorMessage(
kCannotFindItemError, GetIDString(item_id));
return false;
}
@@ -374,7 +376,7 @@ bool RemoveContextMenuFunction::RunImpl() {
MenuItem* item = manager->GetItemById(id);
// Ensure one extension can't remove another's menu items.
if (!item || item->extension_id() != extension_id()) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(
+ error_ = ErrorUtils::FormatErrorMessage(
kCannotFindItemError, GetIDString(id));
return false;
}

Powered by Google App Engine
This is Rietveld 408576698