UrlPatternIndexMatcher: Support returning highest priority matching rule

Desktop / Chromium - Karan Bhatia [chromium.org] - 6 November 2017 22:42 EST

This CL adds support to UrlPatternIndexMatcher to return the highest priority matching rule. This will be subsequently used by Declarative Net Request to resolve conflicts for redirect rules within an extension ruleset. When multiple redirect rules match for a given request, the rule with the highest priority will be used to determine the redirect url.

BUG=696822

Change-Id: I40a9beb5d0deb637cd4aab39c5f914fafb936cbd Reviewed-on: https://chromium-review.googlesource.com/748962

03368bedc075 UrlPatternIndexMatcher: Support returning highest priority matching rule.
.../core/common/indexed_ruleset.cc | 14 +++-
.../url_pattern_index/flat/url_pattern_index.fbs | 4 +-
components/url_pattern_index/url_pattern_index.cc | 98 ++++++++++++++++++----
components/url_pattern_index/url_pattern_index.h | 21 +++--
.../url_pattern_index_unittest.cc | 72 +++++++++++++++-
.../api/declarative_net_request/ruleset_matcher.cc | 18 ++--
6 files changed, 191 insertions(+), 36 deletions(-)

Upstream: git.chromium.org


  • Share