| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_COMMON_VARIATIONS_VARIATIONS_UTIL_H_ | 5 #ifndef COMPONENTS_VARIATIONS_FIELDTRIAL_UTIL_H_ |
| 6 #define CHROME_COMMON_VARIATIONS_VARIATIONS_UTIL_H_ | 6 #define COMPONENTS_VARIATIONS_FIELDTRIAL_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 class FeatureList; | 11 class FeatureList; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace chrome_variations { | 14 namespace variations { |
| 15 | 15 |
| 16 struct FieldTrialTestingConfig; | 16 struct FieldTrialTestingConfig; |
| 17 | 17 |
| 18 // Provides a mechanism to associate multiple set of params to multiple groups | 18 // Provides a mechanism to associate multiple set of params to multiple groups |
| 19 // with a formatted string specified from commandline. See | 19 // with a formatted string specified from commandline. See |
| 20 // kForceFieldTrialParams in chrome/common/chrome_switches.cc for more details | 20 // kForceFieldTrialParams in chrome/common/chrome_switches.cc for more details |
| 21 // on the formatting. | 21 // on the formatting. |
| 22 bool AssociateParamsFromString(const std::string& variations_string); | 22 bool AssociateParamsFromString(const std::string& variations_string); |
| 23 | 23 |
| 24 // Provides a mechanism to associate multiple set of params and features to | 24 // Provides a mechanism to associate multiple set of params and features to |
| 25 // multiple groups with the |config| struct. This will also force the selection | 25 // multiple groups with the |config| struct. This will also force the selection |
| 26 // of FieldTrial groups specified in the |config|. Registers features associated | 26 // of FieldTrial groups specified in the |config|. Registers features associated |
| 27 // with default field trials with |feature_list|. | 27 // with default field trials with |feature_list|. |
| 28 void AssociateParamsFromFieldTrialConfig(const FieldTrialTestingConfig& config, | 28 void AssociateParamsFromFieldTrialConfig(const FieldTrialTestingConfig& config, |
| 29 base::FeatureList* feature_list); | 29 base::FeatureList* feature_list); |
| 30 | 30 |
| 31 // Associates params and features to FieldTrial groups and forces the selection | 31 // Associates params and features to FieldTrial groups and forces the selection |
| 32 // of groups specified in testing/variations/fieldtrial_testing_config_*.json. | 32 // of groups specified in testing/variations/fieldtrial_testing_config_*.json. |
| 33 // Registers features associated with default field trials with |feature_list|. | 33 // Registers features associated with default field trials with |feature_list|. |
| 34 void AssociateDefaultFieldTrialConfig(base::FeatureList* feature_list); | 34 void AssociateDefaultFieldTrialConfig(base::FeatureList* feature_list); |
| 35 | 35 |
| 36 } // namespace chrome_variations | 36 } // namespace variations |
| 37 | 37 |
| 38 #endif // CHROME_COMMON_VARIATIONS_VARIATIONS_UTIL_H_ | 38 #endif // COMPONENTS_VARIATIONS_FIELDTRIAL_UTIL_H_ |
| OLD | NEW |