[ChromeOS] Migrate TurnSyncOnHelper to SyncConsentOptional
Bug: 1227693, 1246824
Change-Id: I6d0aebf164d248ab251ae4e05adc857e124131bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3133082
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Auto-Submit: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918537}
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc
index cd1e1fec..5b33118 100644
--- a/ash/constants/ash_features.cc
+++ b/ash/constants/ash_features.cc
@@ -1081,8 +1081,10 @@
// Uses the same browser sync consent dialog as Windows/Mac/Linux. Allows the
// user to fully opt-out of browser sync, including marking the IdentityManager
-// primary account as unconsented. Requires SplitSettingsSync.
+// primary account as unconsented. Requires SyncConsentOptional.
// NOTE: Call UseBrowserSyncConsent() to test the flag, see implementation.
+// TODO(https://crbug.com/1246824) Maybe deprecate the flag in favor of
+// SyncConsentOptional.
const base::Feature kUseBrowserSyncConsent{"UseBrowserSyncConsent",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -1672,8 +1674,8 @@
}
bool ShouldUseBrowserSyncConsent() {
- // UseBrowserSyncConsent requires SplitSettingsSync.
- return base::FeatureList::IsEnabled(kSplitSettingsSync) &&
+ // UseBrowserSyncConsent requires SyncConsentOptional.
+ return base::FeatureList::IsEnabled(kSyncConsentOptional) &&
base::FeatureList::IsEnabled(kUseBrowserSyncConsent);
}
diff --git a/chrome/browser/ash/sync/turn_sync_on_helper_unittest.cc b/chrome/browser/ash/sync/turn_sync_on_helper_unittest.cc
index b5da7c4b..7a489036 100644
--- a/chrome/browser/ash/sync/turn_sync_on_helper_unittest.cc
+++ b/chrome/browser/ash/sync/turn_sync_on_helper_unittest.cc
@@ -49,7 +49,7 @@
class TurnSyncOnHelperTest : public BrowserWithTestWindowTest {
public:
TurnSyncOnHelperTest() {
- feature_list_.InitWithFeatures({chromeos::features::kSplitSettingsSync,
+ feature_list_.InitWithFeatures({chromeos::features::kSyncConsentOptional,
chromeos::features::kUseBrowserSyncConsent},
{});
}