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

Unified Diff: components/subresource_filter/core/browser/subresource_filter_features_test_support.cc

Issue 2831373002: Introduce subresource_filter::ConfigurationList and make querying it cheap. (Closed)
Patch Set: Rebase. 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: components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
index 16b8354e0e7379f7a7215f2c88c0130604324050..5e43f17dd69cede72da0465e2a4ed30d97640408 100644
--- a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
+++ b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
@@ -65,10 +65,18 @@ ScopedSubresourceFilterFeatureToggle::ScopedSubresourceFilterFeatureToggle(
}
scoped_feature_list_.InitWithFeatureList(std::move(feature_list));
+
+ // Force the active ConfigurationList to be reparsed on next access so that
+ // the variation parameters come into effect.
+ ClearCachedActiveConfigurations();
}
ScopedSubresourceFilterFeatureToggle::~ScopedSubresourceFilterFeatureToggle() {
variations::testing::ClearAllVariationParams();
+
+ // Force the active ConfigurationList to be reparsed on next access, so that
+ // the overrides from this instance are no longer in effect.
+ ClearCachedActiveConfigurations();
}
} // namespace testing

Powered by Google App Engine
This is Rietveld 408576698