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

Unified Diff: chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc

Issue 9225053: Add a blocking version of the sync promo dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 11 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/ui/webui/sync_promo/sync_promo_trial.cc
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
index e00caf52a29206d1585b99b5099e610386568fca..99ed7552c4e9f583ef9fd1bc9fee1c200bbd567c 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
@@ -27,6 +27,7 @@ enum LayoutExperimentType {
LAYOUT_EXPERIMENT_DEVICES,
LAYOUT_EXPERIMENT_VERBOSE,
LAYOUT_EXPERIMENT_SIMPLE,
+ LAYOUT_EXPERIMENT_DIALOG,
LAYOUT_EXPERIMENT_NONE,
LAYOUT_EXPERIMENT_BOUNDARY,
};
@@ -56,6 +57,8 @@ bool GetActiveLayoutExperiment(LayoutExperimentType* type) {
*type = LAYOUT_EXPERIMENT_VERBOSE;
else if (brand == "GGRJ" || brand == "CHCJ")
*type = LAYOUT_EXPERIMENT_SIMPLE;
+ else if (brand == "GGRK" || brand == "CHCK")
+ *type = LAYOUT_EXPERIMENT_DIALOG;
else if (brand == "GGRL" || brand == "CHCL")
*type = LAYOUT_EXPERIMENT_NONE;
else
@@ -83,7 +86,7 @@ void Activate() {
// For dev and beta we don't have brand codes so we randomly enroll users.
if (chrome::VersionInfo::GetChannel() !=
chrome::VersionInfo::CHANNEL_STABLE) {
- // Create a field trial that expires in August 8, 2012. It contains 5 groups
+ // Create a field trial that expires in August 8, 2012. It contains 6 groups
// with each group having an equal chance of enrollment.
scoped_refptr<base::FieldTrial> trial(new base::FieldTrial(
kLayoutExperimentTrialName, 5, "default", 2012, 8, 1));
@@ -93,6 +96,7 @@ void Activate() {
trial->AppendGroup("", 1);
trial->AppendGroup("", 1);
trial->AppendGroup("", 1);
+ trial->AppendGroup("", 1);
}
}
@@ -143,7 +147,7 @@ void RecordUserSignedIn(content::WebUI* web_ui) {
}
}
-bool GetSyncPromoVersionForCurrentTrial(int* version) {
+bool GetSyncPromoVersionForCurrentTrial(SyncPromoUI::Version* version) {
DCHECK(sync_promo_trial_initialized);
DCHECK(version);
@@ -153,16 +157,19 @@ bool GetSyncPromoVersionForCurrentTrial(int* version) {
switch (type) {
case LAYOUT_EXPERIMENT_DEFAULT:
- *version = 0;
+ *version = SyncPromoUI::VERSION_DEFAULT;
return true;
case LAYOUT_EXPERIMENT_DEVICES:
- *version = 1;
+ *version = SyncPromoUI::VERSION_DEVICES;
return true;
case LAYOUT_EXPERIMENT_VERBOSE:
- *version = 2;
+ *version = SyncPromoUI::VERSION_VERBOSE;
return true;
case LAYOUT_EXPERIMENT_SIMPLE:
- *version = 3;
+ *version = SyncPromoUI::VERSION_SIMPLE;
+ return true;
+ case LAYOUT_EXPERIMENT_DIALOG:
+ *version = SyncPromoUI::VERSION_DIALOG;
return true;
default:
return false;

Powered by Google App Engine
This is Rietveld 408576698