🧇 Mark for prefs::kSearchEnginesChoiceProfile for deprecation
This pref was not read or written since Nov 2023 (usage removed in
https://crrev.com/c/5018001) but the cleanup had not been done. This
CL now marks it deprecated, cleans up old values, and removes
associated useless codepaths
Bug: 309936758
Change-Id: I342f7dd48ee4a1c87ddc7c88405ecf957a32e8d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5300589
Commit-Queue: Nicolas Dossou-Gbété <[email protected]>
Reviewed-by: David Roger <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1261658}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c305241f..2ab6e76 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -993,6 +993,9 @@
};
#endif
+// Deprecated 02/2024
+constexpr char kSearchEnginesChoiceProfile[] = "search_engines.choice_profile";
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1106,6 +1109,9 @@
#if BUILDFLAG(IS_MAC)
registry->RegisterBooleanPref(kScreenTimeEnabled, true);
#endif
+
+ // Deprecated 02/2024.
+ registry->RegisterFilePathPref(kSearchEnginesChoiceProfile, base::FilePath());
}
// Register prefs used only for migration (clearing or moving to a new key).
@@ -1520,7 +1526,6 @@
metrics::TabStatsTracker::RegisterPrefs(registry);
performance_manager::user_tuning::prefs::RegisterLocalStatePrefs(registry);
RegisterBrowserPrefs(registry);
- SearchEngineChoiceDialogService::RegisterLocalStatePrefs(registry);
SearchEngineChoiceClientSideTrial::RegisterLocalStatePrefs(registry);
speech::SodaInstaller::RegisterLocalStatePrefs(registry);
StartupBrowserCreator::RegisterLocalStatePrefs(registry);
@@ -2263,6 +2268,10 @@
#if BUILDFLAG(IS_MAC)
local_state->ClearPref(kScreenTimeEnabled);
#endif
+
+ // Added 02/2024
+ local_state->ClearPref(kSearchEnginesChoiceProfile);
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS