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

Unified Diff: components/ntp_tiles/field_trial.cc

Issue 2671793003: Turn Popular sites on by default. (Closed)
Patch Set: Rebase and feedback. Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/field_trial.cc
diff --git a/components/ntp_tiles/field_trial.cc b/components/ntp_tiles/field_trial.cc
index ce421dcc668e98387626bc629ea0e81a607a7b28..e3f5f6d7c7a659dcc5a83480a266b75ae612e97f 100644
--- a/components/ntp_tiles/field_trial.cc
+++ b/components/ntp_tiles/field_trial.cc
@@ -43,17 +43,20 @@ void SetUpFirstLaunchFieldTrial(bool is_stable_channel) {
if (base::FieldTrialList::TrialExists(kPopularSitesFieldTrialName))
return;
+ // The experiment is only for stable channel, the other channels will simply
+ // get the default behavior.
+ if (!is_stable_channel)
+ return;
+
// Stable channels will run with 10% probability.
- // Non-stable channels will run with 50% probability.
const base::FieldTrial::Probability kTotalProbability = 100;
- const base::FieldTrial::Probability kEnabledAndControlProbability =
- is_stable_channel ? 10 : 50;
+ const base::FieldTrial::Probability kEnabledAndControlProbability = 10;
- // Experiment enabled until March 15, 2017. By default, disabled.
+ // Experiment enabled until April 26, 2017.
scoped_refptr<base::FieldTrial> trial(
base::FieldTrialList::FactoryGetFieldTrial(
kPopularSitesFieldTrialName, kTotalProbability,
- kPopularSiteDefaultGroup, 2017, 3, 15, // Mar 15, 2017
+ kPopularSiteDefaultGroup, 2017, 4, 26, // Apr 26, 2017
base::FieldTrial::ONE_TIME_RANDOMIZED, nullptr));
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -96,6 +99,13 @@ bool ShouldShowPopularSites() {
}
#endif
+#if defined(OS_IOS)
+ // On iOS, if not enrolled in the experiment, the default is to enable the
+ // feature.
+ if (group_name.empty() || (group_name == kPopularSiteDefaultGroup))
+ return true;
+#endif
+
return base::StartsWith(group_name, "Enabled",
base::CompareCase::INSENSITIVE_ASCII);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698