[WebAuthn] Allow retry on failed enclave PIN attempts for UV

With this change, entering an incorrect GPM PIN for a UV passkey request
will cause the PIN entry dialog to be displayed once again, in order for
the user to retry. The number of consecutive failed PIN attempts is
tracked in a profile pref.

The UI will later be updated to reflect that a PIN re-entry is required.
Also in a coming CL, exceeding the PIN failure maximum will trigger UI
prompting the user to change their PIN.

Bug: 40274370
Change-Id: I9316a17e1ac577ee8bdc0c6cd9e7193da9c358ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5466051
Commit-Queue: Ken Buchanan <[email protected]>
Reviewed-by: Dominic Battre <[email protected]>
Reviewed-by: Adam Langley <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1289882}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index f324c89..5b82694 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -2174,6 +2174,9 @@
   registry->RegisterStringPref(
       webauthn::pref_names::kLastUsedPairingFromSyncPublicKey, "");
 
+  registry->RegisterIntegerPref(
+      webauthn::pref_names::kEnclaveFailedPINAttemptsCount, 0);
+
   side_panel_prefs::RegisterProfilePrefs(registry);
 #endif