Index: components/variations/variations_associated_data.h |
diff --git a/components/variations/variations_associated_data.h b/components/variations/variations_associated_data.h |
index 0579781d962b1839c77a73bab1d5a2d75810da37..b3f2082ecfeda0094d8a62dffeb696204cf4d7fc 100644 |
--- a/components/variations/variations_associated_data.h |
+++ b/components/variations/variations_associated_data.h |
@@ -10,7 +10,6 @@ |
#include <string> |
#include <vector> |
-#include "base/metrics/field_trial.h" |
#include "components/variations/active_field_trials.h" |
// This file provides various helpers that extend the functionality around |
@@ -45,7 +44,7 @@ |
namespace base { |
struct Feature; |
-} |
+} // namespace base |
namespace variations { |
@@ -164,35 +163,14 @@ std::string GetVariationParamValueByFeature(const base::Feature& feature, |
// Expose some functions for testing. |
namespace testing { |
-// Use this class as a member in your test class to set variation params for |
-// your tests. You can directly set the parameters in the constructor (if they |
-// are used by other members upon construction). You can change them later |
-// arbitrarily many times using the SetVariationParams function. Internally, it |
-// creates a FieldTrialList as a member. It works well for multiple tests of a |
-// given test class, as it clears the parameters when this class is destructed. |
-// Note that it clears all parameters (not just those registered here). |
-class VariationParamsManager { |
- public: |
- VariationParamsManager(const std::string& trial_name, |
- const std::map<std::string, std::string>& params); |
- ~VariationParamsManager(); |
- |
- // Associates |params| with the given |trial_name|. It creates a new group, |
- // used only for testing. Between two calls of this function, |
- // ClearAllVariationParams() has to be called. |
- void SetVariationParams(const std::string& trial_name, |
- const std::map<std::string, std::string>& params); |
- |
- private: |
- std::unique_ptr<base::FieldTrialList> field_trial_list_; |
- |
- DISALLOW_COPY_AND_ASSIGN(VariationParamsManager); |
-}; |
- |
-// Clears all of the mapped associations. |
+// Clears all of the mapped associations. Deprecated, try to use |
+// VariationParamsManager instead as it does a lot of work for you |
+// automatically. |
void ClearAllVariationIDs(); |
-// Clears all of the associated params. |
+// Clears all of the associated params. Deprecated, try to use |
+// VariationParamsManager instead as it does a lot of work for you |
+// automatically. |
void ClearAllVariationParams(); |
} // namespace testing |