[FPF] Refactor ScriptBlockingRuleApplierService Refactor the script blocking rule application logic to improve clarity and robustness. The previous implementation had multiple states representing the absence of rules (nullopt, empty string, invalid JSON), making the logic complex. This change introduces a clearer state management by using std::optional throughout the data flow. A std::nullopt now unambiguously signals that the content rule list should be removed. The service's logic is split into BuildRules() and BuildAndApplyRules() to separate concerns. ContentRuleListData and the component installer are updated to propagate the optional state. This prepares the code for adding UMA metrics. Bug: 418218469 Change-Id: I081dd3ef2b51fc5e3aff5ff8e139ce944558008b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6867492 Reviewed-by: Martin Pan-Verde <thesalsa@google.com> Reviewed-by: Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Ron Sailer <rsailer@chromium.org> Cr-Commit-Position: refs/heads/main@{#1504586}
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.