| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ | 5 #ifndef CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ |
| 6 #define CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ | 6 #define CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // Retrieves a specific parameter value corresponding to |param_name| for the | 130 // Retrieves a specific parameter value corresponding to |param_name| for the |
| 131 // variation associated with the specified field trial, based on its selected | 131 // variation associated with the specified field trial, based on its selected |
| 132 // group. If the field trial does not exist or the specified parameter does not | 132 // group. If the field trial does not exist or the specified parameter does not |
| 133 // exist, returns an empty string. Calling this function will result in the | 133 // exist, returns an empty string. Calling this function will result in the |
| 134 // field trial being marked as active if found (i.e. group() will be called on | 134 // field trial being marked as active if found (i.e. group() will be called on |
| 135 // it), if it wasn't already. Currently, this information is only available from | 135 // it), if it wasn't already. Currently, this information is only available from |
| 136 // the browser process. Thread safe. | 136 // the browser process. Thread safe. |
| 137 std::string GetVariationParamValue(const std::string& trial_name, | 137 std::string GetVariationParamValue(const std::string& trial_name, |
| 138 const std::string& param_name); | 138 const std::string& param_name); |
| 139 | 139 |
| 140 // Expose some functions for testing. These functions just wrap functionality | 140 // Expose some functions for testing. |
| 141 // that is implemented above. | |
| 142 namespace testing { | 141 namespace testing { |
| 143 | 142 |
| 144 // Clears all of the mapped associations. | 143 // Clears all of the mapped associations. |
| 145 void ClearAllVariationIDs(); | 144 void ClearAllVariationIDs(); |
| 146 | 145 |
| 146 // Clears all of the associated params. |
| 147 void ClearAllVariationParams(); |
| 148 |
| 147 } // namespace testing | 149 } // namespace testing |
| 148 | 150 |
| 149 } // namespace chrome_variations | 151 } // namespace chrome_variations |
| 150 | 152 |
| 151 #endif // CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ | 153 #endif // CHROME_COMMON_METRICS_VARIATIONS_VARIATIONS_ASSOCIATED_DATA_H_ |
| OLD | NEW |