OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/autocomplete/autocomplete_field_trial.h" | 5 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "chrome/common/metrics/variations_util.h" | 11 #include "chrome/common/metrics/variations/variation_ids.h" |
12 #include "chrome/common/metrics/variation_ids.h" | 12 #include "chrome/common/metrics/variations/variations_util.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Field trial names. | 16 // Field trial names. |
17 static const char kDisallowInlineHQPFieldTrialName[] = | 17 static const char kDisallowInlineHQPFieldTrialName[] = |
18 "OmniboxDisallowInlineHQP"; | 18 "OmniboxDisallowInlineHQP"; |
19 static const char kSuggestFieldTrialName[] = "OmniboxSearchSuggest"; | 19 static const char kSuggestFieldTrialName[] = "OmniboxSearchSuggest"; |
20 static const char kHQPNewScoringFieldTrialName[] = "OmniboxHQPNewScoring"; | 20 static const char kHQPNewScoringFieldTrialName[] = "OmniboxHQPNewScoring"; |
21 | 21 |
22 // Field trial experiment probabilities. | 22 // Field trial experiment probabilities. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 bool AutocompleteFieldTrial::InHQPNewScoringFieldTrialExperimentGroup() { | 158 bool AutocompleteFieldTrial::InHQPNewScoringFieldTrialExperimentGroup() { |
159 if (!InHQPNewScoringFieldTrial()) | 159 if (!InHQPNewScoringFieldTrial()) |
160 return false; | 160 return false; |
161 | 161 |
162 // Return true if we're in the experiment group. | 162 // Return true if we're in the experiment group. |
163 const int group = base::FieldTrialList::FindValue( | 163 const int group = base::FieldTrialList::FindValue( |
164 kHQPNewScoringFieldTrialName); | 164 kHQPNewScoringFieldTrialName); |
165 return group == hqp_new_scoring_experiment_group; | 165 return group == hqp_new_scoring_experiment_group; |
166 } | 166 } |
OLD | NEW |