Commit e0bf6128 authored by fhorschig's avatar fhorschig Committed by Commit bot

Make FieldTrialList usable after clearing VariationsParamsManager.

Calling |ClearAllVariationParams| will now create a new instance of the
FieldTrialList so |SetVariationParamsWithFeatureAssociations| will
work again.

BUG=672010

Review-Url: https://codereview.chromium.org/2590883002
Cr-Commit-Position: refs/heads/master@{#439824}
parent b31071df
...@@ -86,6 +86,9 @@ void VariationParamsManager::ClearAllVariationParams() { ...@@ -86,6 +86,9 @@ void VariationParamsManager::ClearAllVariationParams() {
// When the scoped feature list is destroyed, it puts back the original // When the scoped feature list is destroyed, it puts back the original
// feature list that was there when InitWithFeatureList() was called. // feature list that was there when InitWithFeatureList() was called.
scoped_feature_list_.reset(new base::test::ScopedFeatureList()); 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 } // namespace testing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment