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

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

Issue 10692158: Refactor URLBlacklistManager to use URLMatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/matcher/url_matcher.cc
diff --git a/chrome/common/extensions/matcher/url_matcher.cc b/chrome/common/extensions/matcher/url_matcher.cc
index d13b508c7d9323037a3b43aaa39ffbc291fb5afb..56f1df40d70aebe6bc4fc70cc8f35da7fba0586b 100644
--- a/chrome/common/extensions/matcher/url_matcher.cc
+++ b/chrome/common/extensions/matcher/url_matcher.cc
@@ -303,6 +303,15 @@ URLMatcherCondition
host_suffix + kEndOfDomain + path_prefix);
}
+URLMatcherCondition
+URLMatcherConditionFactory::CreateHostEqualsPathPrefixCondition(
+ const std::string& host,
+ const std::string& path_prefix) {
+ return CreateCondition(URLMatcherCondition::HOST_EQUALS_PATH_PREFIX,
+ kBeginningOfURL + CanonicalizeHostname(host) + kEndOfDomain +
+ path_prefix);
+}
+
std::string URLMatcherConditionFactory::CanonicalizeURLForFullSearches(
const GURL& url) {
return kBeginningOfURL + CanonicalizeHostname(url.host()) + url.path() +

Powered by Google App Engine
This is Rietveld 408576698