Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: chrome/browser/instant/instant_field_trial.cc

Issue 8400068: Don't send omnibox bounds for hidden field trials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_field_trial.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698