[WebAuthn] Foreground Windows Hello dialog on repeated attempts

UserVerifyingKeyProviderWin has code to push the Windows Hello user
auth dialog to the front when it appears, but if the user enters an
incorrect Hello PIN then the dialog comes back and remains behind other
windows still.

This changes the polling mechanism to continue after the dialog is
already available, though with reduced frequency. If the dialog goes
away and comes back then this will foreground it again within half a
second for the user to try again. Polling is cancelled when a success
or failure callback is invoked from the operation.

Bug: 40274370
Change-Id: Icc530f4c4bf72059f647c4a45c8c1bbdb438a341
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5533962
Reviewed-by: Adam Langley <agl@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300255}
NOKEYCHECK=True
GitOrigin-RevId: 47785fadd5f8fc4a20b83ad412ab5e1be15ec796
1 file changed
tree: ba891fb85083b52101b4ba8820d97175e635019a
  1. aead.cc
  2. aead.h
  3. aead_unittest.cc
  4. apple_keychain.h
  5. apple_keychain_ios.mm
  6. apple_keychain_mac.cc
  7. apple_keychain_util.h
  8. apple_keychain_util.mm
  9. apple_keychain_util_unittest.mm
  10. apple_keychain_v2.h
  11. apple_keychain_v2.mm
  12. BUILD.gn
  13. chaps_support.cc
  14. chaps_support.h
  15. crypto_export.h
  16. DEPS
  17. DIR_METADATA
  18. ec_private_key.cc
  19. ec_private_key.h
  20. ec_private_key_unittest.cc
  21. ec_signature_creator.cc
  22. ec_signature_creator.h
  23. ec_signature_creator_impl.cc
  24. ec_signature_creator_impl.h
  25. ec_signature_creator_unittest.cc
  26. encryptor.cc
  27. encryptor.h
  28. encryptor_unittest.cc
  29. fake_apple_keychain_v2.h
  30. fake_apple_keychain_v2.mm
  31. features.cc
  32. features.gni
  33. features.h
  34. hkdf.cc
  35. hkdf.h
  36. hmac.cc
  37. hmac.h
  38. hmac_unittest.cc
  39. mac_security_services_lock.cc
  40. mac_security_services_lock.h
  41. mock_apple_keychain.cc
  42. mock_apple_keychain.h
  43. mock_apple_keychain_ios.cc
  44. mock_apple_keychain_mac.cc
  45. nss_crypto_module_delegate.h
  46. nss_key_util.cc
  47. nss_key_util.h
  48. nss_key_util_unittest.cc
  49. nss_util.cc
  50. nss_util.h
  51. nss_util_chromeos.cc
  52. nss_util_internal.h
  53. nss_util_unittest.cc
  54. openssl_util.cc
  55. openssl_util.h
  56. OWNERS
  57. p224_spake.cc
  58. p224_spake.h
  59. p224_spake_unittest.cc
  60. random.cc
  61. random.h
  62. random_unittest.cc
  63. rsa_private_key.cc
  64. rsa_private_key.h
  65. rsa_private_key_unittest.cc
  66. scoped_capi_types.h
  67. scoped_cng_types.h
  68. scoped_fake_apple_keychain_v2.h
  69. scoped_fake_apple_keychain_v2.mm
  70. scoped_fake_user_verifying_key_provider.cc
  71. scoped_fake_user_verifying_key_provider.h
  72. scoped_lacontext.h
  73. scoped_lacontext.mm
  74. scoped_mock_unexportable_key_provider.cc
  75. scoped_mock_unexportable_key_provider.h
  76. scoped_nss_types.h
  77. scoped_test_nss_chromeos_user.cc
  78. scoped_test_nss_chromeos_user.h
  79. scoped_test_nss_db.cc
  80. scoped_test_nss_db.h
  81. scoped_test_system_nss_key_slot.cc
  82. scoped_test_system_nss_key_slot.h
  83. secure_hash.cc
  84. secure_hash.h
  85. secure_hash_unittest.cc
  86. secure_util.cc
  87. secure_util.h
  88. sha2.cc
  89. sha2.h
  90. sha2_unittest.cc
  91. signature_creator.cc
  92. signature_creator.h
  93. signature_creator_unittest.cc
  94. signature_verifier.cc
  95. signature_verifier.h
  96. signature_verifier_unittest.cc
  97. symmetric_key.cc
  98. symmetric_key.h
  99. symmetric_key_unittest.cc
  100. unexportable_key.cc
  101. unexportable_key.h
  102. unexportable_key_mac.h
  103. unexportable_key_mac.mm
  104. unexportable_key_mac_unittest.mm
  105. unexportable_key_metrics.cc
  106. unexportable_key_metrics.h
  107. unexportable_key_metrics_unittest.cc
  108. unexportable_key_software_unsecure.cc
  109. unexportable_key_unittest.cc
  110. unexportable_key_win.cc
  111. unexportable_key_win.h
  112. user_verifying_key.cc
  113. user_verifying_key.h
  114. user_verifying_key_mac.mm
  115. user_verifying_key_mac_unittest.mm
  116. user_verifying_key_win.cc