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

Unified Diff: chrome/common/extensions/url_pattern_set.cc

Issue 8312005: Ignore paths when matching patterns for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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
« no previous file with comments | « chrome/common/extensions/url_pattern_set.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/url_pattern_set.cc
diff --git a/chrome/common/extensions/url_pattern_set.cc b/chrome/common/extensions/url_pattern_set.cc
index cf2b9a6f8642b79ff7de6bb2c2c19f56c1574153..b2f5f257899f2bbf001a1b3c0d9330d4512b230a 100644
--- a/chrome/common/extensions/url_pattern_set.cc
+++ b/chrome/common/extensions/url_pattern_set.cc
@@ -90,6 +90,16 @@ bool URLPatternSet::MatchesURL(const GURL& url) const {
return false;
}
+bool URLPatternSet::MatchesSecurityOrigin(const GURL& origin) const {
+ for (URLPatternSet::const_iterator pattern = patterns_.begin();
+ pattern != patterns_.end(); ++pattern) {
+ if (pattern->MatchesSecurityOrigin(origin))
+ return true;
+ }
+
+ return false;
+}
+
bool URLPatternSet::OverlapsWith(const URLPatternSet& other) const {
// Two extension extents overlap if there is any one URL that would match at
// least one pattern in each of the extents.
« no previous file with comments | « chrome/common/extensions/url_pattern_set.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698