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

Unified Diff: components/variations/variations_params_manager.cc

Issue 2590883002: Make FieldTrialList usable after clearing VariationsParamsManager. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/variations_params_manager.cc
diff --git a/components/variations/variations_params_manager.cc b/components/variations/variations_params_manager.cc
index e4b92cc1bbbad950f2bda1c8763a3d61b36514a4..4d90a102e0d642c2cecbce564a921758a2abc0b6 100644
--- a/components/variations/variations_params_manager.cc
+++ b/components/variations/variations_params_manager.cc
@@ -86,6 +86,9 @@ void VariationParamsManager::ClearAllVariationParams() {
// When the scoped feature list is destroyed, it puts back the original
// feature list that was there when InitWithFeatureList() was called.
scoped_feature_list_.reset(new base::test::ScopedFeatureList());
+ // Ensure the destructor is called properly, so it can be freshly recreated.
+ field_trial_list_.reset();
+ field_trial_list_ = base::MakeUnique<base::FieldTrialList>(nullptr);
}
} // namespace testing
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698