#include "components/autofill/core/browser/webdata/payments/autofill_wallet_credential_sync_bridge.h"
#include <utility>
#include "base/check.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "components/autofill/core/browser/webdata/autofill_change.h"
#include "components/autofill/core/browser/webdata/autofill_sync_metadata_table.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_backend.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/deletion_origin.h"
#include "components/sync/model/client_tag_based_data_type_processor.h"
#include "components/sync/model/metadata_change_list.h"
#include "components/sync/model/sync_metadata_store_change_list.h"
#include "components/sync/protocol/autofill_wallet_credential_specifics.pb.h"
#include "components/sync/protocol/entity_data.h"
namespace autofill {
namespace {
const char kAutofillWalletCredentialSyncBridgeUserDataKey[] = …;
}
void AutofillWalletCredentialSyncBridge::CreateForWebDataServiceAndBackend(
AutofillWebDataBackend* web_data_backend,
AutofillWebDataService* web_data_service) { … }
AutofillWalletCredentialSyncBridge*
AutofillWalletCredentialSyncBridge::FromWebDataService(
AutofillWebDataService* web_data_service) { … }
AutofillWalletCredentialSyncBridge::AutofillWalletCredentialSyncBridge(
std::unique_ptr<syncer::DataTypeLocalChangeProcessor> change_processor,
AutofillWebDataBackend* web_data_backend)
: … { … }
AutofillWalletCredentialSyncBridge::~AutofillWalletCredentialSyncBridge() { … }
std::unique_ptr<syncer::MetadataChangeList>
AutofillWalletCredentialSyncBridge::CreateMetadataChangeList() { … }
std::optional<syncer::ModelError>
AutofillWalletCredentialSyncBridge::MergeFullSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_data) { … }
std::optional<syncer::ModelError>
AutofillWalletCredentialSyncBridge::ApplyIncrementalSyncChanges(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_data) { … }
std::unique_ptr<syncer::DataBatch>
AutofillWalletCredentialSyncBridge::GetDataForCommit(
StorageKeyList storage_keys) { … }
std::unique_ptr<syncer::DataBatch>
AutofillWalletCredentialSyncBridge::GetAllDataForDebugging() { … }
std::string AutofillWalletCredentialSyncBridge::GetClientTag(
const syncer::EntityData& entity_data) { … }
std::string AutofillWalletCredentialSyncBridge::GetStorageKey(
const syncer::EntityData& entity_data) { … }
void AutofillWalletCredentialSyncBridge::ApplyDisableSyncChanges(
std::unique_ptr<syncer::MetadataChangeList> delete_metadata_change_list) { … }
bool AutofillWalletCredentialSyncBridge::IsEntityDataValid(
const syncer::EntityData& entity_data) const { … }
void AutofillWalletCredentialSyncBridge::ServerCvcChanged(
const ServerCvcChange& change) { … }
PaymentsAutofillTable* AutofillWalletCredentialSyncBridge::GetAutofillTable() { … }
AutofillSyncMetadataTable*
AutofillWalletCredentialSyncBridge::GetSyncMetadataStore() { … }
void AutofillWalletCredentialSyncBridge::ActOnLocalChange(
const ServerCvcChange& change) { … }
void AutofillWalletCredentialSyncBridge::LoadMetadata() { … }
std::unique_ptr<syncer::MutableDataBatch>
AutofillWalletCredentialSyncBridge::ConvertToDataBatch(
const std::vector<std::unique_ptr<ServerCvc>>& server_cvc_list) { … }
}