Commit 03148594 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Chromium LUCI CQ

[CrOS Settings] Don't create SplitSettingsSync experiment on stable

Fixes an issue where users who were opted into the trial on
Canary/Dev/Beta and then switched to Stable could still be opted into
the experiment.

Bug: 1147325
Change-Id: I25e153323efc9108cdde2404785d637912d8b01e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560909
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832995}
parent d4dc58fd
...@@ -68,7 +68,9 @@ std::string CreateFirstRunTrial(base::FeatureList* feature_list) { ...@@ -68,7 +68,9 @@ std::string CreateFirstRunTrial(base::FeatureList* feature_list) {
default_percent = 0; default_percent = 0;
break; break;
case version_info::Channel::STABLE: case version_info::Channel::STABLE:
// Disabled on stable pending approval. https://crbug.com/1020731 // Disabled on Stable pending approval (see https://crbug.com/1020731).
// Note that this code is not currently accessed on Stable channel due to
// the early return in Create() below.
enabled_percent = 0; enabled_percent = 0;
disabled_percent = 0; disabled_percent = 0;
default_percent = 100; default_percent = 100;
...@@ -105,6 +107,14 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { ...@@ -105,6 +107,14 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
} }
void Create(base::FeatureList* feature_list, PrefService* local_state) { void Create(base::FeatureList* feature_list, PrefService* local_state) {
// This field trial is only intended to be run on Canary/Dev/Beta channels.
// If the user is on Stable channel, return early so that they are not opted
// into this experiment. Without this return, users who were opted into the
// experiment on Canary/Dev/Beta, then changed to Stable, could still be in
// the experiment. See https://crbug.com/1147325.
if (chrome::GetChannel() == version_info::Channel::STABLE)
return;
std::string trial_group = local_state->GetString(kTrialGroupPrefName); std::string trial_group = local_state->GetString(kTrialGroupPrefName);
if (trial_group.empty()) { if (trial_group.empty()) {
// No group assigned, this is the first run. // No group assigned, this is the first run.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment