Sort the list of deprecated prefs in chronological order.
Also add a comment to remind future readers to do the same.
Change-Id: Ifab01143efe99a41154106c219c9551782acc6d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3518749
Reviewed-by: Gabriel Charette <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#980783}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index dd5e3223..a265ff6 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -462,38 +462,8 @@
namespace {
-// Deprecated 02/2022
-const char kFlocIdValuePrefKey[] = "federated_learning.floc_id.value";
-const char kFlocIdStatusPrefKey[] = "federated_learning.floc_id.status";
-const char kFlocIdHistoryBeginTimePrefKey[] =
- "federated_learning.floc_id.history_begin_time";
-const char kFlocIdHistoryEndTimePrefKey[] =
- "federated_learning.floc_id.history_end_time";
-const char kFlocIdFinchConfigVersionPrefKey[] =
- "federated_learning.floc_id.finch_config_version";
-const char kFlocIdSortingLshVersionPrefKey[] =
- "federated_learning.floc_id.sorting_lsh_version";
-const char kFlocIdComputeTimePrefKey[] =
- "federated_learning.floc_id.compute_time";
-
-// Deprecated 10/2021
-const char kTabStripStackedLayout[] = "tab-strip-stacked-layout";
-
-#if BUILDFLAG(IS_CHROMEOS_ASH)
-// Deprecated 5/2021
-const char kFeatureUsageDailySampleESim[] = "feature_usage.daily_sample.ESim";
-const char kFeatureUsageDailySampleFingerprint[] =
- "feature_usage.daily_sample.Fingerprint";
-
-// Deprecated 10/2021
-const char kHasCameraAppMigratedToSWA[] = "camera.has_migrated_to_swa";
-
-// Deprecated 10/2021
-const char kTimesHIDDialogShown[] = "HIDDialog.shown_how_many_times";
-
-// Deprecated 10/2021
-const char kSplitSettingsSyncTrialGroup[] = "split_settings_sync.trial_group";
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+// Please keep the list of deprecated prefs in chronological order. i.e. Add to
+// the bottom of the list, not here at the top.
// Deprecated 04/2021.
const char kSessionStatisticFCPMean[] =
@@ -529,6 +499,13 @@
const char kSpellCheckBlacklistedDictionaries[] =
"spellcheck.blacklisted_dictionaries";
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 05/2021
+const char kFeatureUsageDailySampleESim[] = "feature_usage.daily_sample.ESim";
+const char kFeatureUsageDailySampleFingerprint[] =
+ "feature_usage.daily_sample.Fingerprint";
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Deprecated 06/2021.
const char kDataReductionProxy[] = "auth.spdyproxy.origin";
@@ -624,6 +601,20 @@
// Deprecated 10/2021.
const char kAppCacheForceEnabled[] = "app_cache_force_enabled";
+// Deprecated 10/2021
+const char kTabStripStackedLayout[] = "tab-strip-stacked-layout";
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 10/2021
+const char kHasCameraAppMigratedToSWA[] = "camera.has_migrated_to_swa";
+
+// Deprecated 10/2021
+const char kTimesHIDDialogShown[] = "HIDDialog.shown_how_many_times";
+
+// Deprecated 10/2021
+const char kSplitSettingsSyncTrialGroup[] = "split_settings_sync.trial_group";
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Deprecated 11/2021.
const char kWasPreviouslySetUpPrefName[] = "android_sms.was_previously_set_up";
@@ -717,6 +708,20 @@
"multidevice_setup.phone_hub_camera_roll_pending_state";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 02/2022
+const char kFlocIdValuePrefKey[] = "federated_learning.floc_id.value";
+const char kFlocIdStatusPrefKey[] = "federated_learning.floc_id.status";
+const char kFlocIdHistoryBeginTimePrefKey[] =
+ "federated_learning.floc_id.history_begin_time";
+const char kFlocIdHistoryEndTimePrefKey[] =
+ "federated_learning.floc_id.history_end_time";
+const char kFlocIdFinchConfigVersionPrefKey[] =
+ "federated_learning.floc_id.finch_config_version";
+const char kFlocIdSortingLshVersionPrefKey[] =
+ "federated_learning.floc_id.sorting_lsh_version";
+const char kFlocIdComputeTimePrefKey[] =
+ "federated_learning.floc_id.compute_time";
+
// Deprecated 03/2022.
const char kStabilityChildProcessCrashCount[] =
"user_experience_metrics.stability.child_process_crash_count";
@@ -1537,10 +1542,6 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Added 5/2021
local_state->ClearPref(kFeatureUsageDailySampleESim);
-
- // Added 10/2021
- local_state->ClearPref(kTimesHIDDialogShown);
- local_state->ClearPref(kSplitSettingsSyncTrialGroup);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 07/2021
@@ -1557,6 +1558,12 @@
// Added 10/2021.
local_state->ClearPref(kTabStripStackedLayout);
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ // Added 10/2021
+ local_state->ClearPref(kTimesHIDDialogShown);
+ local_state->ClearPref(kSplitSettingsSyncTrialGroup);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Added 12/2021.
local_state->ClearPref(kStabilityRendererHangCount);
local_state->ClearPref(kStabilityIncompleteSessionEndCount);
@@ -1614,11 +1621,6 @@
chrome_browser_net::secure_dns::MigrateProbesSettingToOrFromBackup(
profile_prefs);
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- // Added 10/2021
- profile_prefs->ClearPref(kHasCameraAppMigratedToSWA);
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
#if !BUILDFLAG(IS_ANDROID)
// Added 04/2021
profile_prefs->ClearPref(prefs::kMediaFeedsBackgroundFetching);
@@ -1764,6 +1766,11 @@
// Added 10/2021.
profile_prefs->ClearPref(kAppCacheForceEnabled);
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ // Added 10/2021
+ profile_prefs->ClearPref(kHasCameraAppMigratedToSWA);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Added 11/2021.
syncer::ClearObsoleteKeystoreBootstrapTokenPref(profile_prefs);
profile_prefs->ClearPref(kWasPreviouslySetUpPrefName);