| Index: extensions/common/matcher/url_matcher.h
|
| diff --git a/extensions/common/matcher/url_matcher.h b/extensions/common/matcher/url_matcher.h
|
| index fb7ace0f0c1a5e9898d5f2ec2985ea92d5a192aa..97301a26a45367f1cb95e2f1cc1e493c8ef963ec 100644
|
| --- a/extensions/common/matcher/url_matcher.h
|
| +++ b/extensions/common/matcher/url_matcher.h
|
| @@ -53,6 +53,7 @@ class URLMatcherCondition {
|
| URL_CONTAINS,
|
| URL_EQUALS,
|
| URL_MATCHES,
|
| + STRIPPED_URL_MATCHES, // Matches the URL minus its query string.
|
| };
|
|
|
| URLMatcherCondition();
|
| @@ -77,6 +78,10 @@ class URLMatcherCondition {
|
| // handled by a regex matcher instead of a substring matcher.
|
| bool IsRegexCondition() const;
|
|
|
| + // Returns whether this URLMatcherCondition is a regular expression that shall
|
| + // be evaluated on the URL without the query parameter.
|
| + bool IsStrippedUrlRegexCondition() const;
|
| +
|
| // Returns whether this condition is fulfilled according to
|
| // |matching_patterns| and |url|.
|
| bool IsMatch(const std::set<StringPattern::ID>& matching_patterns,
|
| @@ -155,6 +160,8 @@ class URLMatcherConditionFactory {
|
|
|
| // Canonicalizes a URL for "CreateURLMatchesCondition" searches.
|
| std::string CanonicalizeURLForRegexSearches(const GURL& url) const;
|
| + // Canonicalizes a URL for "CreateStrippedURLMatchesCondition" searches.
|
| + std::string CanonicalizeURLForStrippedUrlRegexSearches(const GURL& url) const;
|
|
|
| URLMatcherCondition CreateURLPrefixCondition(const std::string& prefix);
|
| URLMatcherCondition CreateURLSuffixCondition(const std::string& suffix);
|
| @@ -162,6 +169,8 @@ class URLMatcherConditionFactory {
|
| URLMatcherCondition CreateURLEqualsCondition(const std::string& str);
|
|
|
| URLMatcherCondition CreateURLMatchesCondition(const std::string& regex);
|
| + URLMatcherCondition CreateStrippedURLMatchesCondition(
|
| + const std::string& regex);
|
|
|
| // Removes all patterns from |pattern_singletons_| that are not listed in
|
| // |used_patterns|. These patterns are not referenced any more and get
|
| @@ -197,6 +206,7 @@ class URLMatcherConditionFactory {
|
| PatternSingletons;
|
| PatternSingletons substring_pattern_singletons_;
|
| PatternSingletons regex_pattern_singletons_;
|
| + PatternSingletons stripped_url_regex_pattern_singletons_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(URLMatcherConditionFactory);
|
| };
|
| @@ -332,6 +342,7 @@ class URLMatcher {
|
| SubstringSetMatcher full_url_matcher_;
|
| SubstringSetMatcher url_component_matcher_;
|
| RegexSetMatcher regex_set_matcher_;
|
| + RegexSetMatcher stripped_url_regex_set_matcher_;
|
| std::set<const StringPattern*> registered_full_url_patterns_;
|
| std::set<const StringPattern*> registered_url_component_patterns_;
|
|
|
|
|