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

Unified Diff: extensions/common/url_pattern_set.cc

Issue 16464004: Turn disallowed URL patterns such as <all_urls> for externally_connectable into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test that warnings also imply failure Created 7 years, 6 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 | « extensions/common/url_pattern_set.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern_set.cc
diff --git a/extensions/common/url_pattern_set.cc b/extensions/common/url_pattern_set.cc
index 7a19c71112cdf7a7e04e42a6ad03619d02a6a9ab..0afe111ab14f4e39fead8bee58f29194488cce9a 100644
--- a/extensions/common/url_pattern_set.cc
+++ b/extensions/common/url_pattern_set.cc
@@ -139,6 +139,15 @@ bool URLPatternSet::Contains(const URLPatternSet& other) const {
return true;
}
+bool URLPatternSet::ContainsPattern(const URLPattern& pattern) const {
+ for (URLPatternSet::const_iterator it = begin();
+ it != end(); ++it) {
+ if (it->Contains(pattern))
+ return true;
+ }
+ return false;
+}
+
bool URLPatternSet::MatchesURL(const GURL& url) const {
for (URLPatternSet::const_iterator pattern = patterns_.begin();
pattern != patterns_.end(); ++pattern) {
@@ -221,13 +230,4 @@ bool URLPatternSet::Populate(const base::ListValue& value,
return Populate(patterns, valid_schemes, allow_file_access, error);
}
-bool URLPatternSet::ContainsPattern(const URLPattern& pattern) const {
- for (URLPatternSet::const_iterator it = begin();
- it != end(); ++it) {
- if (it->Contains(pattern))
- return true;
- }
- return false;
-}
-
} // namespace extensions
« no previous file with comments | « extensions/common/url_pattern_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698