It would be useful to be able to query the indexed ruleset file from the command line. We could do this by making a new build target, similar to cachetool.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/94338e596e246cd10ae8cb346e5eb751a87ca39a commit 94338e596e246cd10ae8cb346e5eb751a87ca39a Author: Josh Karlin <jkarlin@chromium.org> Date: Mon Jan 29 21:18:58 2018 Pretty printing for flatbuffer url rules. Bug: 793025 Change-Id: I9707ded8397c178ab3cdd65c2c71851c64b00c00 Reviewed-on: https://chromium-review.googlesource.com/889791 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#532592} [modify] https://crrev.com/94338e596e246cd10ae8cb346e5eb751a87ca39a/components/url_pattern_index/BUILD.gn [add] https://crrev.com/94338e596e246cd10ae8cb346e5eb751a87ca39a/components/url_pattern_index/url_rule_util.cc [add] https://crrev.com/94338e596e246cd10ae8cb346e5eb751a87ca39a/components/url_pattern_index/url_rule_util.h [add] https://crrev.com/94338e596e246cd10ae8cb346e5eb751a87ca39a/components/url_pattern_index/url_rule_util_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a8f0905fc0786d3eb7aea956b48ea01bb8e61091 commit a8f0905fc0786d3eb7aea956b48ea01bb8e61091 Author: Josh Karlin <jkarlin@chromium.org> Date: Tue Jan 30 18:19:53 2018 Creates a tool that converts unindexed rulesets to indexed on disk Creates a new binary, subresource_indexing_tool, that takes an unindexed ruleset as input and writes an indexed ruleset as output. Bug: 793025 Change-Id: Ieeb10aab4ba80c83baf8058fe202e4d4fcd770e1 Reviewed-on: https://chromium-review.googlesource.com/891140 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#532952} [modify] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/BUILD.gn [modify] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/test_ruleset_utils.cc [modify] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/test_ruleset_utils.h [add] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/tools/indexing_tool.cc [add] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/tools/indexing_tool.h [add] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/tools/indexing_tool_main.cc [add] https://crrev.com/a8f0905fc0786d3eb7aea956b48ea01bb8e61091/components/subresource_filter/core/common/tools/indexing_tool_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e6272e53e1a237ba4f1e17deb03dd26baee8d464 commit e6272e53e1a237ba4f1e17deb03dd26baee8d464 Author: Josh Karlin <jkarlin@chromium.org> Date: Wed Jan 31 18:16:14 2018 Fix indexed rule anchor printing The | and || fields were flipped, and the tests failed to catch it because the UrlPattern class doesn't parse the anchors like I thought it did. Bug: 793025 Change-Id: I1154783844a3f2915a7b0609a3ed4b04b69d9ae4 Reviewed-on: https://chromium-review.googlesource.com/895664 Reviewed-by: Charlie Harrison <csharrison@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#533331} [modify] https://crrev.com/e6272e53e1a237ba4f1e17deb03dd26baee8d464/components/url_pattern_index/url_rule_util.cc [modify] https://crrev.com/e6272e53e1a237ba4f1e17deb03dd26baee8d464/components/url_pattern_index/url_rule_util_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3b63fa254f0b7a704f1d438e849c729b331bdb71 commit 3b63fa254f0b7a704f1d438e849c729b331bdb71 Author: Josh Karlin <jkarlin@chromium.org> Date: Wed Feb 07 18:26:50 2018 Creates subresource_filter_tool binary The subresource_filter_tool binary takes an indexed ruleset and a set of requests and prints out if the ruleset would have blocked or allowed the request and the matching rule if any. Bug: 793025 Change-Id: I97314ed4a0dfbf63d6022ad468ab4d577ca8f37a Reviewed-on: https://chromium-review.googlesource.com/895884 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#535066} [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/BUILD.gn [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/document_subresource_filter.cc [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/document_subresource_filter.h [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/document_subresource_filter_unittest.cc [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/indexed_ruleset.cc [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/indexed_ruleset.h [modify] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/indexed_ruleset_unittest.cc [add] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/tools/filter_tool.cc [add] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/tools/filter_tool.h [add] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/tools/filter_tool_main.cc [add] https://crrev.com/3b63fa254f0b7a704f1d438e849c729b331bdb71/components/subresource_filter/core/common/tools/filter_tool_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/093c8162aab809c61340ed5fa1c0b84bf8771ca0 commit 093c8162aab809c61340ed5fa1c0b84bf8771ca0 Author: Josh Karlin <jkarlin@chromium.org> Date: Mon May 07 19:28:45 2018 [FilterTool] Convert input from CSV to JSON format Update FilterTool to accept BigQuery's JSON output as its input. Bug: 793025 Change-Id: Ibc8b7f961b53755e11577fb109e20a66dfb1c007 Reviewed-on: https://chromium-review.googlesource.com/1047826 Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#556527} [add] https://crrev.com/093c8162aab809c61340ed5fa1c0b84bf8771ca0/components/subresource_filter/core/common/perftests/data/http_archive_top_100_page_requests [delete] https://crrev.com/839fc677647379a36046da82dcad7a41b11ec7fb/components/subresource_filter/core/common/perftests/data/httparchive_request_corpus.csv [modify] https://crrev.com/093c8162aab809c61340ed5fa1c0b84bf8771ca0/components/subresource_filter/core/common/perftests/indexed_ruleset_perftest.cc [modify] https://crrev.com/093c8162aab809c61340ed5fa1c0b84bf8771ca0/components/subresource_filter/tools/filter_tool.cc [modify] https://crrev.com/093c8162aab809c61340ed5fa1c0b84bf8771ca0/components/subresource_filter/tools/filter_tool_main.cc [modify] https://crrev.com/093c8162aab809c61340ed5fa1c0b84bf8771ca0/components/subresource_filter/tools/filter_tool_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/99e7ef1fdeee2fe067c22d9698fd56f78d33f77e commit 99e7ef1fdeee2fe067c22d9698fd56f78d33f77e Author: Josh Karlin <jkarlin@chromium.org> Date: Wed May 09 11:01:06 2018 Add documentation for filtering out rarely used filter list rules Bug: 793025 Change-Id: I433fd34af2ef79c5f29761c9f0aea8a794682842 Reviewed-on: https://chromium-review.googlesource.com/1047827 Reviewed-by: Charlie Harrison <csharrison@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#557143} [add] https://crrev.com/99e7ef1fdeee2fe067c22d9698fd56f78d33f77e/components/subresource_filter/FILTER_LIST_GENERATION.md
Comment 1 by bugdroid1@chromium.org
, Jan 29 2018