[SmartLock]: Deprecate hardlock local state pref

Since the deprecation of sign in with Smart Lock, hardlock is obsolete.
This cl is the final change required to cleanup unused hardlock code.

TEST=existing unittests pass and manually tested smart lock with pixel4a
and strongbad device.

Change-Id: I82f6a931f998b7f6d73898014ca388d063f23299
Bug: b/227674947
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4396086
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Ryan Hansberry <[email protected]>
Reviewed-by: Alexander Alekseev <[email protected]>
Commit-Queue: Brittany Hartmire <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1126291}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index ea6e974..f836e4a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -809,6 +809,11 @@
     "webauthn.last_op_used_native_api";
 #endif
 
+// Deprecated 03/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+const char kEasyUnlockHardlockState[] = "easy_unlock.hardlock_state";
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
 // Register local state used only for migration (clearing or moving to a new
 // key).
 void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -903,6 +908,11 @@
 #if BUILDFLAG(IS_CHROMEOS_ASH)
   registry->RegisterDictionaryPref(kEasyUnlockLocalStateUserPrefs);
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// Deprecated 04/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  registry->RegisterDictionaryPref(kEasyUnlockHardlockState);
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 }
 
 // Register prefs used only for migration (clearing or moving to a new key).
@@ -1222,7 +1232,6 @@
   ash::DeviceNameStore::RegisterLocalStatePrefs(registry);
   chromeos::DeviceOAuth2TokenStoreChromeOS::RegisterPrefs(registry);
   ash::device_settings_cache::RegisterPrefs(registry);
-  ash::EasyUnlockService::RegisterPrefs(registry);
   ash::EnableAdbSideloadingScreen::RegisterPrefs(registry);
   ash::device_activity::DeviceActivityController::RegisterPrefs(registry);
   ash::EnableDebuggingScreenHandler::RegisterPrefs(registry);
@@ -1865,6 +1874,11 @@
   local_state->ClearPref(kEasyUnlockLocalStateUserPrefs);
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
+// Added 04/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  local_state->ClearPref(kEasyUnlockHardlockState);
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
   // Please don't delete the following line. It is used by PRESUBMIT.py.
   // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS