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

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: Thread safe handling of Profiles 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 38ee088d11e03d1a6519d644b2eccdb447d3d3b6..8bdde3120f5a4dc53e336d159d26b88df6f0e614 100644
--- a/chrome/browser/instant/instant_field_trial.cc
+++ b/chrome/browser/instant/instant_field_trial.cc
@@ -81,3 +81,16 @@ std::string InstantFieldTrial::GetGroupName(Profile* profile) {
NOTREACHED();
return "InstantUnknown";
}
+
+// static
+std::string InstantFieldTrial::GetGroupAsUrlParam(Profile* profile) {
+ switch (GetGroup(profile)) {
+ case INACTIVE: return "";
Peter Kasting 2011/08/10 20:54:06 Nit: Use std::string() instead of "" (2 places)
+ 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