[waffle]Deprecate kDefaultSearchProviderChoiceLocationPrefName pref

Fixed: b:340826494
Change-Id: I9703bc2335ee55cc0362ca1699febb14a201a139
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545237
Auto-Submit: Jack Yammine <[email protected]>
Commit-Queue: Nicolas Dossou-Gbété <[email protected]>
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Nicolas Dossou-Gbété <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1302507}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 6c57d487..975d74c 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1091,6 +1091,10 @@
 // Deprecated 05/2024.
 constexpr char kBlockTruncatedCookies[] = "profile.cookie_block_truncated";
 
+// Deprecated 05/2024
+inline constexpr char kDefaultSearchProviderChoiceLocationPrefName[] =
+    "default_search_provider_data.choice_location";
+
 // Register local state used only for migration (clearing or moving to a new
 // key).
 void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1567,6 +1571,11 @@
 
   // Deprecated 05/2024.
   registry->RegisterBooleanPref(kBlockTruncatedCookies, true);
+
+  // Deprecated 05/2024
+  registry->RegisterIntegerPref(
+      kDefaultSearchProviderChoiceLocationPrefName,
+      static_cast<int>(search_engines::ChoiceMadeLocation::kOther));
 }
 
 void ClearSyncRequestedPrefAndMaybeMigrate(PrefService* profile_prefs) {
@@ -2930,6 +2939,9 @@
   // Added 05/2024.
   profile_prefs->ClearPref(kBlockTruncatedCookies);
 
+  // Added 05/2024
+  profile_prefs->ClearPref(kDefaultSearchProviderChoiceLocationPrefName);
+
   // Please don't delete the following line. It is used by PRESUBMIT.py.
   // END_MIGRATE_OBSOLETE_PROFILE_PREFS