#include "components/autofill/core/browser/payments/full_card_request.h"
#include <memory>
#include "base/check_deref.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"
#include "components/autofill/core/browser/metrics/payments/better_auth_metrics.h"
#include "components/autofill/core/browser/metrics/payments/card_unmask_authentication_metrics.h"
#include "components/autofill/core/browser/payments/autofill_payments_feature_availability.h"
#include "components/autofill/core/browser/payments/payments_util.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "url/origin.h"
namespace autofill {
namespace payments {
PaymentsRpcResult;
FullCardRequest::FullCardRequest(
AutofillClient* autofill_client,
PaymentsNetworkInterface* payments_network_interface,
PersonalDataManager* personal_data_manager)
: … { … }
FullCardRequest::~FullCardRequest() = default;
void FullCardRequest::GetFullCard(
const CreditCard& card,
PaymentsAutofillClient::UnmaskCardReason reason,
base::WeakPtr<ResultDelegate> result_delegate,
base::WeakPtr<UIDelegate> ui_delegate,
const url::Origin& merchant_domain_for_footprints,
std::optional<std::string> context_token) { … }
void FullCardRequest::GetFullVirtualCardViaCVC(
const CreditCard& card,
PaymentsAutofillClient::UnmaskCardReason reason,
base::WeakPtr<ResultDelegate> result_delegate,
base::WeakPtr<UIDelegate> ui_delegate,
const GURL& last_committed_primary_main_frame_origin,
const std::string& vcn_context_token,
const CardUnmaskChallengeOption& selected_challenge_option,
const url::Origin& merchant_domain_for_footprints) { … }
void FullCardRequest::GetFullCardViaFIDO(
const CreditCard& card,
PaymentsAutofillClient::UnmaskCardReason reason,
base::WeakPtr<ResultDelegate> result_delegate,
base::Value::Dict fido_assertion_info,
const url::Origin& merchant_domain_for_footprints,
std::optional<GURL> last_committed_primary_main_frame_origin,
std::optional<std::string> context_token) { … }
void FullCardRequest::GetFullCardImpl(
const CreditCard& card,
PaymentsAutofillClient::UnmaskCardReason reason,
base::WeakPtr<ResultDelegate> result_delegate,
base::WeakPtr<UIDelegate> ui_delegate,
std::optional<base::Value::Dict> fido_assertion_info,
std::optional<GURL> last_committed_primary_main_frame_origin,
std::optional<std::string> context_token,
std::optional<CardUnmaskChallengeOption> selected_challenge_option,
const url::Origin& merchant_domain_for_footprints) { … }
void FullCardRequest::OnUnmaskPromptAccepted(
const UserProvidedUnmaskDetails& user_response) { … }
void FullCardRequest::OnUnmaskPromptCancelled() { … }
bool FullCardRequest::ShouldOfferFidoAuth() const { … }
void FullCardRequest::OnDidGetUnmaskRiskData(const std::string& risk_data) { … }
void FullCardRequest::SendUnmaskCardRequest() { … }
void FullCardRequest::OnDidGetRealPan(
PaymentsRpcResult result,
const PaymentsNetworkInterface::UnmaskResponseDetails& response_details) { … }
void FullCardRequest::OnFIDOVerificationCancelled() { … }
void FullCardRequest::Reset() { … }
}
}