| Index: extensions/common/url_pattern_set.cc
|
| diff --git a/extensions/common/url_pattern_set.cc b/extensions/common/url_pattern_set.cc
|
| index 9e9926d7b2e87e27ede3f6b6a4200e18785a442b..fc213164eef5857bdf68f890e71a77afb079a040 100644
|
| --- a/extensions/common/url_pattern_set.cc
|
| +++ b/extensions/common/url_pattern_set.cc
|
| @@ -149,6 +149,15 @@ bool URLPatternSet::MatchesURL(const GURL& url) const {
|
| return false;
|
| }
|
|
|
| +bool URLPatternSet::MatchesAllURLs() const {
|
| + for (URLPatternSet::const_iterator host = begin(); host != end(); ++host) {
|
| + if (host->match_all_urls() ||
|
| + (host->match_subdomains() && host->host().empty()))
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| bool URLPatternSet::MatchesSecurityOrigin(const GURL& origin) const {
|
| for (URLPatternSet::const_iterator pattern = patterns_.begin();
|
| pattern != patterns_.end(); ++pattern) {
|
| @@ -207,6 +216,17 @@ bool URLPatternSet::Populate(const std::vector<std::string>& patterns,
|
| return true;
|
| }
|
|
|
| +scoped_ptr<std::vector<std::string> > URLPatternSet::ToStringVector() const {
|
| + scoped_ptr<std::vector<std::string> > value(new std::vector<std::string>);
|
| + for (URLPatternSet::const_iterator i = patterns_.begin();
|
| + i != patterns_.end();
|
| + ++i) {
|
| + value->push_back(i->GetAsString());
|
| + }
|
| + std::unique(value->begin(), value->end());
|
| + return value.Pass();
|
| +}
|
| +
|
| bool URLPatternSet::Populate(const base::ListValue& value,
|
| int valid_schemes,
|
| bool allow_file_access,
|
|
|