| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/variations/variations_params_manager.h" | 5 #include "components/variations/variations_params_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 void VariationParamsManager::ClearAllVariationIDs() { | 80 void VariationParamsManager::ClearAllVariationIDs() { |
| 81 variations::testing::ClearAllVariationIDs(); | 81 variations::testing::ClearAllVariationIDs(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void VariationParamsManager::ClearAllVariationParams() { | 84 void VariationParamsManager::ClearAllVariationParams() { |
| 85 variations::testing::ClearAllVariationParams(); | 85 variations::testing::ClearAllVariationParams(); |
| 86 // When the scoped feature list is destroyed, it puts back the original | 86 // When the scoped feature list is destroyed, it puts back the original |
| 87 // feature list that was there when InitWithFeatureList() was called. | 87 // feature list that was there when InitWithFeatureList() was called. |
| 88 scoped_feature_list_.reset(new base::test::ScopedFeatureList()); | 88 scoped_feature_list_.reset(new base::test::ScopedFeatureList()); |
| 89 // Ensure the destructor is called properly, so it can be freshly recreated. |
| 90 field_trial_list_.reset(); |
| 91 field_trial_list_ = base::MakeUnique<base::FieldTrialList>(nullptr); |
| 89 } | 92 } |
| 90 | 93 |
| 91 } // namespace testing | 94 } // namespace testing |
| 92 } // namespace variations | 95 } // namespace variations |
| OLD | NEW |