forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DNR: Add filter_list_converter tool.
Filter List Converter is a tool to convert filter list files in the text format to a JSON file in a format supported by the Declarative Net Request API. It can either output the complete extension (with a manifest file and a JSON ruleset) or just the JSON ruleset. This is based on the ruleset converter module in the subresource_filter component. BUG=972290 Change-Id: Id67ccaa5cc3cc469da67865c3754b41182d1ab9f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1139592 Auto-Submit: Karan Bhatia <karandeepb@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Cr-Commit-Position: refs/heads/master@{#672233}
- Loading branch information
Karan Bhatia
authored and
Commit Bot
committed
Jun 25, 2019
1 parent
732c12d
commit 4860e09
Showing
11 changed files
with
853 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
extensions/browser/api/declarative_net_request/filter_list_converter/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2019 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//extensions/buildflags/buildflags.gni") | ||
|
||
assert(enable_extensions) | ||
|
||
source_set("support") { | ||
testonly = true | ||
sources = [ | ||
"converter.cc", | ||
"converter.h", | ||
] | ||
deps = [ | ||
"//base", | ||
"//components/subresource_filter/tools/ruleset_converter:support", | ||
"//extensions/browser", | ||
"//extensions/common", | ||
"//extensions/common:test_support", | ||
"//url", | ||
] | ||
} | ||
|
||
executable("filter_list_converter") { | ||
testonly = true | ||
sources = [ | ||
"main.cc", | ||
] | ||
deps = [ | ||
":support", | ||
"//base", | ||
] | ||
} | ||
|
||
source_set("unit_tests") { | ||
testonly = true | ||
sources = [ | ||
"converter_unittest.cc", | ||
] | ||
deps = [ | ||
":support", | ||
"//base", | ||
"//testing/gtest", | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
extensions/browser/api/declarative_net_request/filter_list_converter/DEPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include_rules = [ | ||
"+components/subresource_filter/tools/ruleset_converter", | ||
] |
6 changes: 6 additions & 0 deletions
6
extensions/browser/api/declarative_net_request/filter_list_converter/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Filter List Converter is a tool to convert filter list files in the text format | ||
to a JSON file in a format supported by the Declarative Net Request API. It can | ||
either output the complete extension or just the JSON ruleset. | ||
|
||
This is based on the ruleset converter module in the subresource_filter | ||
component. |
Oops, something went wrong.