Index: components/subresource_filter/core/browser/subresource_filter_features.cc |
diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc |
index 943c2e78f29f1c68fa657f1c522f9ff525d910e9..d3aec5fe5543a93206be24c032a7726f26269a9a 100644 |
--- a/components/subresource_filter/core/browser/subresource_filter_features.cc |
+++ b/components/subresource_filter/core/browser/subresource_filter_features.cc |
@@ -153,8 +153,14 @@ const char kSuppressNotificationsParameterName[] = "suppress_notifications"; |
const char kWhitelistSiteOnReloadParameterName[] = "whitelist_site_on_reload"; |
Configuration::Configuration() = default; |
-Configuration::~Configuration() = default; |
+Configuration::Configuration(ActivationLevel activation_level, |
+ ActivationScope activation_scope, |
+ ActivationList activation_list) |
+ : activation_level(activation_level), |
+ activation_scope(activation_scope), |
+ activation_list(activation_list) {} |
Configuration::Configuration(Configuration&&) = default; |
+Configuration::~Configuration() = default; |
Configuration& Configuration::operator=(Configuration&&) = default; |
ConfigurationList::ConfigurationList(Configuration config) |
@@ -172,9 +178,11 @@ scoped_refptr<ConfigurationList> GetActiveConfigurations() { |
namespace testing { |
-void ClearCachedActiveConfigurations() { |
+scoped_refptr<ConfigurationList> ReplaceCachedActiveConfigurations( |
+ scoped_refptr<ConfigurationList> configs) { |
base::AutoLock lock(g_active_configurations_lock.Get()); |
- g_active_configurations.Get() = nullptr; |
+ std::swap(g_active_configurations.Get(), configs); |
+ return configs; |
} |
} // namespace testing |