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..ffd10a5b813e61d88bfb2aeb2f1b07f63282aea8 100644 |
--- a/chrome/common/extensions/url_pattern_set.cc |
+++ b/chrome/common/extensions/url_pattern_set.cc |
@@ -90,6 +90,17 @@ bool URLPatternSet::MatchesURL(const GURL& url) const { |
return false; |
} |
+bool URLPatternSet::MatchesSecurityOrigin(const std::string& origin) const { |
+ GURL origin_as_url(origin); |
+ for (URLPatternSet::const_iterator pattern = patterns_.begin(); |
+ pattern != patterns_.end(); ++pattern) { |
+ if (pattern->MatchesSecurityOrigin(origin_as_url)) |
+ 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. |