| 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..dc5d6aaa8884c6d6ebf0a93f5e25db7d6a4aeb3c 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::IsCompletelyEmpty() 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::IsCompletelyEmpty() const {
|
| + return condition_factory_.IsCompletelyEmpty() &&
|
| + url_matcher_condition_sets_.empty() &&
|
| + substring_match_triggers_.empty() &&
|
| + full_url_matcher_.IsCompletelyEmpty() &&
|
| + url_component_matcher_.IsCompletelyEmpty() &&
|
| + 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
|
|
|