diff options
Diffstat (limited to 'chromium/components/autofill/core/browser/payments/full_card_request.h')
-rw-r--r-- | chromium/components/autofill/core/browser/payments/full_card_request.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/chromium/components/autofill/core/browser/payments/full_card_request.h b/chromium/components/autofill/core/browser/payments/full_card_request.h index 20c9408860f..b09fbb8d213 100644 --- a/chromium/components/autofill/core/browser/payments/full_card_request.h +++ b/chromium/components/autofill/core/browser/payments/full_card_request.h @@ -32,6 +32,24 @@ namespace payments { // TODO(crbug/1061638): Refactor to use base::WaitableEvent where possible. class FullCardRequest final : public CardUnmaskDelegate { public: + // The type of failure. + enum FailureType { + // The user closed the prompt. The following scenarios are possible: + // 1) The user declined to enter their CVC and closed the prompt. + // 2) The user provided their CVC, got auth declined and then closed the + // prompt without attempting a second time. + // 3) The user provided their CVC and closed the prompt before waiting for + // the result. + PROMPT_CLOSED, + + // The card could not be looked up due to card auth declined or failed. + VERIFICATION_DECLINED, + + // The request failed for technical reasons, such as a closing page or lack + // of network connection. + GENERIC_FAILURE + }; + // The interface for receiving the full card details. class ResultDelegate { public: @@ -40,7 +58,7 @@ class FullCardRequest final : public CardUnmaskDelegate { const payments::FullCardRequest& full_card_request, const CreditCard& card, const base::string16& cvc) = 0; - virtual void OnFullCardRequestFailed() = 0; + virtual void OnFullCardRequestFailed(FailureType failure_type) = 0; }; // The delegate responsible for displaying the unmask prompt UI. |