#include "components/autofill/core/browser/payments/iban_save_manager.h"
#include "base/check_deref.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/autofill_experiments.h"
#include "components/autofill/core/browser/data_model/iban.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"
#include "components/autofill/core/browser/metrics/payments/iban_metrics.h"
#include "components/autofill/core/browser/payments/legal_message_line.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"
#include "components/autofill/core/browser/payments/payments_network_interface.h"
#include "components/autofill/core/browser/payments/payments_util.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/strike_databases/payments/iban_save_strike_database.h"
#include "components/autofill/core/common/autofill_regexes.h"
#include "components/sync/service/sync_user_settings.h"
namespace autofill {
PaymentsRpcResult;
IbanSaveManager::IbanSaveManager(AutofillClient* client)
: … { … }
IbanSaveManager::~IbanSaveManager() = default;
std::string IbanSaveManager::GetPartialIbanHashString(
const std::string& value) { … }
bool IbanSaveManager::IsIbanUploadEnabled(
const syncer::SyncService* sync_service,
AutofillMetrics::PaymentsSigninState signin_state_for_metrics) { … }
bool IbanSaveManager::AttemptToOfferSave(Iban& import_candidate) { … }
void IbanSaveManager::UpdateRecordType(Iban& import_candidate) { … }
IbanSaveManager::TypeOfOfferToSave IbanSaveManager::DetermineHowToSaveIban(
const Iban& import_candidate) const { … }
bool IbanSaveManager::MatchesExistingLocalIban(
const Iban& import_candidate) const { … }
bool IbanSaveManager::MatchesExistingServerIban(
const Iban& import_candidate) const { … }
bool IbanSaveManager::AttemptToOfferLocalSave(Iban& import_candidate) { … }
bool IbanSaveManager::AttemptToOfferUploadSave(Iban& import_candidate) { … }
IbanSaveStrikeDatabase* IbanSaveManager::GetIbanSaveStrikeDatabase() { … }
void IbanSaveManager::OnUserDidDecideOnLocalSave(
Iban import_candidate,
payments::PaymentsAutofillClient::SaveIbanOfferUserDecision user_decision,
std::u16string_view nickname) { … }
void IbanSaveManager::OnUserDidDecideOnUploadSave(
Iban import_candidate,
bool show_save_prompt,
payments::PaymentsAutofillClient::SaveIbanOfferUserDecision user_decision,
std::u16string_view nickname) { … }
void IbanSaveManager::OnDidGetUploadDetails(
bool show_save_prompt,
Iban import_candidate,
PaymentsRpcResult result,
const std::u16string& validation_regex,
const std::u16string& context_token,
std::unique_ptr<base::Value::Dict> legal_message) { … }
void IbanSaveManager::SendUploadRequest(const Iban& import_candidate,
bool show_save_prompt) { … }
void IbanSaveManager::OnDidUploadIban(const Iban& import_candidate,
bool show_save_prompt,
PaymentsRpcResult result) { … }
PaymentsDataManager& IbanSaveManager::payments_data_manager() { … }
const PaymentsDataManager& IbanSaveManager::payments_data_manager() const { … }
}