Commit f504fe3e authored by Sujie Zhu's avatar Sujie Zhu Committed by Commit Bot

[Autofill Auth] Signal can_fetch_unmask_details_ when canceling the verify pending dialog

Currently can_fetch_unmask_details_ is resignaled only when refresh/success FIDO auth/success or cancel in CVC auth/after 3min timeout. So if user canceled in verify pending dialog (not reset the signal), and select one card again from the same tab, we won't fire any UnmaskDetail requests and wait for 3s timeout[1] (we do nothing in these 3 seconds), then call CreditCardAccessManager::Authenticate with FALSE (which will show CVC dialog).

With this change, we will resignal the can_fetch_unmask_details_ when canceling the verify pending dialog so that user is allowed to fetch UnmaskDetail and try FIDO auth for the second time.

Note that later the verify pending dialog will only show/clickable before/after OS dialog. If user cancel OS dialog, we will fall back to CVC automatically (which also reset the signal no matter success/cancel the CVC auth).

[1] https://cs.chromium.org/chromium/src/components/autofill/core/browser/payments/credit_card_access_manager.cc?l=322-328&rcl=a797d14e1dc5964d7f5a307b6e6d65b4927e8c64

Bug: 949269
Change-Id: If7b11ac1f31e80e9a4789001856423c67dec1381
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930108Reviewed-by: default avatarJared Saul <jsaul@google.com>
Reviewed-by: default avatarSiyu An <siyua@chromium.org>
Commit-Queue: Sujie Zhu <sujiezhu@google.com>
Cr-Commit-Position: refs/heads/master@{#718247}
parent 2e98b29a
...@@ -533,9 +533,12 @@ void CreditCardAccessManager::ShowVerifyPendingDialog() { ...@@ -533,9 +533,12 @@ void CreditCardAccessManager::ShowVerifyPendingDialog() {
} }
void CreditCardAccessManager::OnDidCancelCardVerification() { void CreditCardAccessManager::OnDidCancelCardVerification() {
// TODO(crbug.com/949269): Add tests and logging for canceling verify pending
// dialog.
GetOrCreateFIDOAuthenticator()->CancelVerification(); GetOrCreateFIDOAuthenticator()->CancelVerification();
unmask_details_request_in_progress_ = false; unmask_details_request_in_progress_ = false;
is_authentication_in_progress_ = false; is_authentication_in_progress_ = false;
SignalCanFetchUnmaskDetails();
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment