| Index: chrome/browser/extensions/api/declarative/url_matcher.cc
|
| diff --git a/chrome/browser/extensions/api/declarative/url_matcher.cc b/chrome/browser/extensions/api/declarative/url_matcher.cc
|
| index 91ee8b55c7ac3468def1e2b71ab4fdf938cd3d61..30993cd888ad9eb2979f995e6770f337c3b30fd5 100644
|
| --- a/chrome/browser/extensions/api/declarative/url_matcher.cc
|
| +++ b/chrome/browser/extensions/api/declarative/url_matcher.cc
|
| @@ -344,6 +344,10 @@ void URLMatcherConditionFactory::ForgetUnusedPatterns(
|
| }
|
| }
|
|
|
| +bool URLMatcherConditionFactory::IsEmpty() const {
|
| + return pattern_singletons_.empty();
|
| +}
|
| +
|
| URLMatcherCondition URLMatcherConditionFactory::CreateCondition(
|
| URLMatcherCondition::Criterion criterion,
|
| const std::string& pattern) {
|
| @@ -480,6 +484,16 @@ std::set<URLMatcherConditionSet::ID> URLMatcher::MatchURL(const GURL& url) {
|
| return result;
|
| }
|
|
|
| +bool URLMatcher::IsEmpty() const {
|
| + return condition_factory_.IsEmpty() &&
|
| + url_matcher_condition_sets_.empty() &&
|
| + substring_match_triggers_.empty() &&
|
| + full_url_matcher_.IsEmpty() &&
|
| + url_component_matcher_.IsEmpty() &&
|
| + registered_full_url_patterns_.empty() &&
|
| + registered_url_component_patterns_.empty();
|
| +}
|
| +
|
| void URLMatcher::UpdateSubstringSetMatcher(bool full_url_conditions) {
|
| // The purpose of |full_url_conditions| is just that we need to execute
|
| // the same logic once for Full URL searches and once for URL Component
|
|
|