DNR: Introduce IndexedRule to store parsed JSON rules

Desktop / Chromium - Karan Bhatia [chromium.org] - 9 August 2017 00:30 EDT

r489421 added the schema for specifying JSON rules for the Declarative Net Request API. This CL introduces IndexedRule to store the parsed JSON rules. In a subsequent CL, this structure will aid in the conversion to a flatbuffer UrlRule as specified by the url_pattern_index component.

Doc=http://go/declarative-net-request (Internal only) BUG=696822

Change-Id: I87b55c0266eafddf521bccb3f7d11757f47c2d7b Reviewed-on: https://chromium-review.googlesource.com/577287 Commit-Queue: Karan Bhatia

9356edc DNR: Introduce IndexedRule to store parsed JSON rules.
extensions/browser/BUILD.gn | 1 +
extensions/browser/api/BUILD.gn | 1 +
.../browser/api/declarative_net_request/BUILD.gn | 22 ++
.../browser/api/declarative_net_request/DEPS | 3 +
.../api/declarative_net_request/constants.h | 38 +++
.../api/declarative_net_request/indexed_rule.cc | 326 +++++++++++++++++++
.../api/declarative_net_request/indexed_rule.h | 67 ++++
.../indexed_rule_unittest.cc | 361 +++++++++++++++++++++
8 files changed, 819 insertions(+)

Upstream: git.chromium.org


  • Share