DNR: Add priority to RequestAction and simplify GetRedirectOrUpgradeActionByPriority.
This CL adds the rule priority to RequestAction. This helps us simplify implementation of GetRedirectOrUpgradeActionByPriority. Also: - Move GetRedirectOrUpgradeActionByPriority from RulesetMatcherInterface to RulesetMatcher, since only RulesetMatcher needs it. - Change the type of |rule_id| in RequestAction from int to uint32_t since that's what is used by url_pattern_index::flat::UrlRule. Any casting to int can happen in client code. - Improve comments in ruleset_matcher_interface.h and extension_url_pattern_index_matcher.h to clarify that we return the highest priority redirect and upgrade actions. This CL does not have any behavior change. BUG=974391 Change-Id: I02385141cfd9dbddf46abd99eeee0bdaf318f40e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888599 Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Reviewed-by:Kelvin Jiang <kelvinjiang@chromium.org> Cr-Commit-Position: refs/heads/master@{#711080}
Showing
Please register or sign in to comment