DeclarativeNetRequest: Add DeclarativeNetRequestPrefsHelper
This CL is a part of adding these two APIs:
- DeclarativeNetRequest.updateStaticRules()
- DeclarativeNetRequest.getDisabledRuleIds()
Add DeclarativeNetRequestPrefsHelper class that provides setter and
getter of the disabled static rule ids.
- GetDisabledStaticRuleIds(<extension_id>, <ruleset_id>)
- GetDisabledStaticRuleCount(<extension_id>)
- UpdateDisabledStaticRules(<extension_id>, <ruleset_id>,
<rule_ids_to_update>)
The disabled rule ids of static rulesets are stored in the extension
prefs as a dictionary:
- key: kDNRStaticRulesetPref + kDNRDisabledStaticRuleIds
- value: { <ruleset id> : <disabled rule ids> }
Bug: 1225229
Change-Id: I58a38df789558fcebaa7633f5e9b12d48eec512b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999643
Commit-Queue: Byungwoo Lee <blee@igalia.com>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1080805}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.