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

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

Issue 2844063002: Add support for multiple simultaneous subresource_filter::Configurations. (Closed)
Patch Set: Minimal polish, still missing unittests for multiple simultaneous configs. Created 3 years, 8 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..1c20d3324cad5a09df31565af3fb1ef2fb814d2b 100644
--- a/chrome/browser/component_updater/subresource_filter_component_installer.cc
+++ b/chrome/browser/component_updater/subresource_filter_component_installer.cc
@@ -112,13 +112,13 @@ 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;
+ std::string ruleset_flavor = subresource_filter::GetActiveConfigurations()
+ ->GetMostSpecificRulesetFlavor();
+
if (ruleset_flavor.empty())
return ruleset_flavor;
- // We allow 4 ruleset flavor identifiers: a, b, c, d
+ // In addition to "", 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