chromium/components/autofill/core/browser/payments/credit_card_cvc_authenticator.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/browser/payments/credit_card_cvc_authenticator.h"

#include <memory>
#include <string>

#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/payments/card_unmask_authentication_metrics.h"
#include "components/autofill/core/browser/payments/card_unmask_challenge_option.h"
#include "components/autofill/core/browser/payments/full_card_request.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"

namespace autofill {

CreditCardCvcAuthenticator::CvcAuthenticationResponse::
    CvcAuthenticationResponse() = default;
CreditCardCvcAuthenticator::CvcAuthenticationResponse::
    ~CvcAuthenticationResponse() = default;

CreditCardCvcAuthenticator::CreditCardCvcAuthenticator(AutofillClient* client)
    :{}

CreditCardCvcAuthenticator::~CreditCardCvcAuthenticator() = default;

void CreditCardCvcAuthenticator::Authenticate(
    const CreditCard& card,
    base::WeakPtr<Requester> requester,
    PersonalDataManager* personal_data_manager,
    std::optional<std::string> context_token,
    std::optional<CardUnmaskChallengeOption> selected_challenge_option) {}

void CreditCardCvcAuthenticator::OnFullCardRequestSucceeded(
    const payments::FullCardRequest& full_card_request,
    const CreditCard& card,
    const std::u16string& cvc) {}

void CreditCardCvcAuthenticator::OnFullCardRequestFailed(
    CreditCard::RecordType card_type,
    payments::FullCardRequest::FailureType failure_type) {}

void CreditCardCvcAuthenticator::ShowUnmaskPrompt(
    const CreditCard& card,
    const CardUnmaskPromptOptions& card_unmask_prompt_options,
    base::WeakPtr<CardUnmaskDelegate> delegate) {}

void CreditCardCvcAuthenticator::OnUnmaskVerificationResult(
    payments::PaymentsAutofillClient::PaymentsRpcResult result) {}

#if BUILDFLAG(IS_ANDROID)
bool CreditCardCvcAuthenticator::ShouldOfferFidoAuth() const {
  return requester_ && requester_->ShouldOfferFidoAuth();
}

bool CreditCardCvcAuthenticator::UserOptedInToFidoFromSettingsPageOnMobile()
    const {
  return requester_ && requester_->UserOptedInToFidoFromSettingsPageOnMobile();
}
#endif

payments::FullCardRequest* CreditCardCvcAuthenticator::GetFullCardRequest() {}

base::WeakPtr<payments::FullCardRequest::UIDelegate>
CreditCardCvcAuthenticator::GetAsFullCardRequestUIDelegate() {}

}  // namespace autofill