OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/instant/instant_field_trial.h" | 5 #include "chrome/browser/instant/instant_field_trial.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "chrome/browser/metrics/metrics_service.h" | 9 #include "chrome/browser/metrics/metrics_service.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 if (group == g_uma_control_a) | 111 if (group == g_uma_control_a) |
112 return UMA_CONTROL_A; | 112 return UMA_CONTROL_A; |
113 if (group == g_uma_control_b) | 113 if (group == g_uma_control_b) |
114 return UMA_CONTROL_B; | 114 return UMA_CONTROL_B; |
115 | 115 |
116 NOTREACHED(); | 116 NOTREACHED(); |
117 return INACTIVE; | 117 return INACTIVE; |
118 } | 118 } |
119 | 119 |
120 // static | 120 // static |
121 bool InstantFieldTrial::IsExperimentGroup(Profile* profile) { | 121 bool InstantFieldTrial::IsInstantExperiment(Profile* profile) { |
122 Group group = GetGroup(profile); | 122 Group group = GetGroup(profile); |
123 return group == INSTANT_EXPERIMENT_A || group == INSTANT_EXPERIMENT_B || | 123 return group == INSTANT_EXPERIMENT_A || group == INSTANT_EXPERIMENT_B || |
124 group == HIDDEN_EXPERIMENT_A || group == HIDDEN_EXPERIMENT_B || | 124 group == HIDDEN_EXPERIMENT_A || group == HIDDEN_EXPERIMENT_B || |
125 group == SILENT_EXPERIMENT_A || group == SILENT_EXPERIMENT_B; | 125 group == SILENT_EXPERIMENT_A || group == SILENT_EXPERIMENT_B; |
126 } | 126 } |
127 | 127 |
128 // static | 128 // static |
129 bool InstantFieldTrial::IsHiddenExperiment(Profile* profile) { | 129 bool InstantFieldTrial::IsHiddenExperiment(Profile* profile) { |
130 Group group = GetGroup(profile); | 130 Group group = GetGroup(profile); |
131 return group == HIDDEN_EXPERIMENT_A || group == HIDDEN_EXPERIMENT_B; | 131 return group == HIDDEN_EXPERIMENT_A || group == HIDDEN_EXPERIMENT_B || |
| 132 group == SILENT_EXPERIMENT_A || group == SILENT_EXPERIMENT_B; |
132 } | 133 } |
133 | 134 |
134 // static | 135 // static |
135 bool InstantFieldTrial::IsSilentExperiment(Profile* profile) { | 136 bool InstantFieldTrial::IsSilentExperiment(Profile* profile) { |
136 Group group = GetGroup(profile); | 137 Group group = GetGroup(profile); |
137 return group == SILENT_EXPERIMENT_A || group == SILENT_EXPERIMENT_B; | 138 return group == SILENT_EXPERIMENT_A || group == SILENT_EXPERIMENT_B; |
138 } | 139 } |
139 | 140 |
140 // static | 141 // static |
141 std::string InstantFieldTrial::GetGroupName(Profile* profile) { | 142 std::string InstantFieldTrial::GetGroupName(Profile* profile) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 174 |
174 case UMA_CONTROL_A: return "ix=uca&"; | 175 case UMA_CONTROL_A: return "ix=uca&"; |
175 case UMA_CONTROL_B: return "ix=ucb&"; | 176 case UMA_CONTROL_B: return "ix=ucb&"; |
176 case ALL_CONTROL_A: return "ix=aca&"; | 177 case ALL_CONTROL_A: return "ix=aca&"; |
177 case ALL_CONTROL_B: return "ix=acb&"; | 178 case ALL_CONTROL_B: return "ix=acb&"; |
178 } | 179 } |
179 | 180 |
180 NOTREACHED(); | 181 NOTREACHED(); |
181 return std::string(); | 182 return std::string(); |
182 } | 183 } |
OLD | NEW |