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

Unified Diff: chrome/browser/instant/instant_field_trial.cc

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/instant/instant_field_trial.cc
diff --git a/chrome/browser/instant/instant_field_trial.cc b/chrome/browser/instant/instant_field_trial.cc
index 90016ff3003085d050cc50efbc519781a21256b9..74dbc00d46b61bd2213108b140c4191c6968e068 100644
--- a/chrome/browser/instant/instant_field_trial.cc
+++ b/chrome/browser/instant/instant_field_trial.cc
@@ -58,3 +58,16 @@ std::string InstantFieldTrial::GetGroupName(Profile* profile) {
NOTREACHED();
return "InstantUnknown";
}
+
+// static
+std::string InstantFieldTrial::GetGroupAsUrlParam(Profile* profile) {
+ switch (GetGroup(profile)) {
+ case INACTIVE: return "";
+ case CONTROL1: return "ix=c1&";
+ case CONTROL2: return "ix=c2&";
+ case EXPERIMENT1: return "ix=e1&";
+ case EXPERIMENT2: return "ix=e2&";
+ }
+ NOTREACHED();
+ return "";
+}

Powered by Google App Engine
This is Rietveld 408576698