| 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 #include "chrome/common/variations/variations_util.h" | 5 #include "components/variations/field_trial_config/field_trial_util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/feature_list.h" | 13 #include "base/feature_list.h" |
| 14 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
| 15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "chrome/common/variations/fieldtrial_testing_config.h" | 17 #include "components/variations/field_trial_config/fieldtrial_testing_config.h" |
| 18 #include "components/variations/variations_associated_data.h" | 18 #include "components/variations/variations_associated_data.h" |
| 19 #include "net/base/escape.h" | 19 #include "net/base/escape.h" |
| 20 | 20 |
| 21 namespace chrome_variations { | 21 namespace variations { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 std::string EscapeValue(const std::string& value) { | 25 std::string EscapeValue(const std::string& value) { |
| 26 return net::UnescapeURLComponent( | 26 return net::UnescapeURLComponent( |
| 27 value, net::UnescapeRule::PATH_SEPARATORS | | 27 value, net::UnescapeRule::PATH_SEPARATORS | |
| 28 net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS); | 28 net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void AssociateParamsFromExperiment( | 31 void AssociateParamsFromExperiment( |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } else { | 143 } else { |
| 144 DLOG(ERROR) << "Unexpected empty study: " << study.name; | 144 DLOG(ERROR) << "Unexpected empty study: " << study.name; |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 void AssociateDefaultFieldTrialConfig(base::FeatureList* feature_list) { | 149 void AssociateDefaultFieldTrialConfig(base::FeatureList* feature_list) { |
| 150 AssociateParamsFromFieldTrialConfig(kFieldTrialConfig, feature_list); | 150 AssociateParamsFromFieldTrialConfig(kFieldTrialConfig, feature_list); |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace chrome_variations | 153 } // namespace variations |
| OLD | NEW |