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

Unified Diff: chrome/common/extensions/matcher/url_matcher_factory.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move into extensions namespace 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/common/extensions/matcher/url_matcher_factory.cc
diff --git a/chrome/common/extensions/matcher/url_matcher_factory.cc b/chrome/common/extensions/matcher/url_matcher_factory.cc
index 8a5273f4099b8104a728b98470e86a611b5bc01e..5a0f6aa9df08bb0982feac152b1d1c3e273c830d 100644
--- a/chrome/common/extensions/matcher/url_matcher_factory.cc
+++ b/chrome/common/extensions/matcher/url_matcher_factory.cc
@@ -8,9 +8,9 @@
#include "base/logging.h"
#include "base/stringprintf.h"
#include "base/values.h"
-#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/extensions/matcher/url_matcher_constants.h"
#include "chrome/common/extensions/matcher/url_matcher_helpers.h"
+#include "extensions/common/extension_error_utils.h"
#include "third_party/re2/re2/re2.h"
namespace helpers = extensions::url_matcher_helpers;
@@ -134,7 +134,7 @@ URLMatcherFactory::CreateFromURLFilterDictionary(
return scoped_refptr<URLMatcherConditionSet>(NULL);
} else {
// Handle unknown attributes.
- *error = ExtensionErrorUtils::FormatErrorMessage(
+ *error = ErrorUtils::FormatErrorMessage(
kUnknownURLFilterAttribute,
condition_attribute_name);
return scoped_refptr<URLMatcherConditionSet>(NULL);
@@ -171,7 +171,7 @@ URLMatcherCondition URLMatcherFactory::CreateURLMatcherCondition(
std::string* error) {
std::string str_value;
if (!value->GetAsString(&str_value)) {
- *error = ExtensionErrorUtils::FormatErrorMessage(kAttributeExpectedString,
+ *error = ErrorUtils::FormatErrorMessage(kAttributeExpectedString,
condition_attribute_name);
return URLMatcherCondition();
}
@@ -179,7 +179,7 @@ URLMatcherCondition URLMatcherFactory::CreateURLMatcherCondition(
if (condition_attribute_name == keys::kURLMatchesKey) {
re2::RE2 regex(str_value);
if (!regex.ok()) {
- *error = ExtensionErrorUtils::FormatErrorMessage(kUnparseableRegexString,
+ *error = ErrorUtils::FormatErrorMessage(kUnparseableRegexString,
str_value,
regex.error());
return URLMatcherCondition();
@@ -195,7 +195,7 @@ scoped_ptr<URLMatcherSchemeFilter> URLMatcherFactory::CreateURLMatcherScheme(
std::string* error) {
std::vector<std::string> schemas;
if (!helpers::GetAsStringVector(value, &schemas)) {
- *error = ExtensionErrorUtils::FormatErrorMessage(kVectorOfStringsExpected,
+ *error = ErrorUtils::FormatErrorMessage(kVectorOfStringsExpected,
keys::kSchemesKey);
return scoped_ptr<URLMatcherSchemeFilter>(NULL);
}

Powered by Google App Engine
This is Rietveld 408576698