Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(991)

Unified Diff: chrome/browser/component_updater/subresource_filter_component_installer.cc

Issue 2844063002: Add support for multiple simultaneous subresource_filter::Configurations. (Closed)
Patch Set: Rebase. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/subresource_filter_component_installer.cc
diff --git a/chrome/browser/component_updater/subresource_filter_component_installer.cc b/chrome/browser/component_updater/subresource_filter_component_installer.cc
index 5016878ec0a13b95fea2a6f541acf3b5f0df1804..791277b26c314d81eb26d1ec3e8488383686864d 100644
--- a/chrome/browser/component_updater/subresource_filter_component_installer.cc
+++ b/chrome/browser/component_updater/subresource_filter_component_installer.cc
@@ -112,13 +112,15 @@ std::string SubresourceFilterComponentInstallerTraits::GetName() const {
// static
std::string SubresourceFilterComponentInstallerTraits::GetInstallerTag() {
- const auto configurations = subresource_filter::GetActiveConfigurations();
- const std::string& ruleset_flavor =
- configurations->the_one_and_only().ruleset_flavor;
+ const std::string ruleset_flavor =
+ subresource_filter::GetEnabledConfigurations()
+ ->lexicographically_greatest_ruleset_flavor()
+ .as_string();
+
+ // Allow the empty, and 4 non-empty ruleset flavor identifiers: a, b, c, d.
if (ruleset_flavor.empty())
return ruleset_flavor;
- // We allow 4 ruleset flavor identifiers: a, b, c, d
if (ruleset_flavor.size() == 1 && ruleset_flavor.at(0) >= 'a' &&
ruleset_flavor.at(0) <= 'd') {
return ruleset_flavor;

Powered by Google App Engine
This is Rietveld 408576698