#include "components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge.h"
#include "base/check.h"
#include "base/ranges/algorithm.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/webdata/addresses/contact_info_sync_util.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/deletion_origin.h"
#include "components/sync/base/features.h"
#include "components/sync/model/client_tag_based_data_type_processor.h"
#include "components/sync/model/in_memory_metadata_change_list.h"
#include "components/sync/model/sync_metadata_store_change_list.h"
namespace autofill {
namespace {
static int kContactInfoSyncBridgeUserDataKey = …;
}
ContactInfoSyncBridge::ContactInfoSyncBridge(
std::unique_ptr<syncer::DataTypeLocalChangeProcessor> change_processor,
AutofillWebDataBackend* backend)
: … { … }
ContactInfoSyncBridge::~ContactInfoSyncBridge() = default;
void ContactInfoSyncBridge::CreateForWebDataServiceAndBackend(
AutofillWebDataBackend* web_data_backend,
AutofillWebDataService* web_data_service) { … }
syncer::DataTypeSyncBridge* ContactInfoSyncBridge::FromWebDataService(
AutofillWebDataService* web_data_service) { … }
std::unique_ptr<syncer::MetadataChangeList>
ContactInfoSyncBridge::CreateMetadataChangeList() { … }
std::optional<syncer::ModelError> ContactInfoSyncBridge::MergeFullSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_data) { … }
std::optional<syncer::ModelError>
ContactInfoSyncBridge::ApplyIncrementalSyncChanges(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_changes) { … }
std::unique_ptr<syncer::DataBatch> ContactInfoSyncBridge::GetDataForCommit(
StorageKeyList storage_keys) { … }
std::unique_ptr<syncer::DataBatch>
ContactInfoSyncBridge::GetAllDataForDebugging() { … }
bool ContactInfoSyncBridge::IsEntityDataValid(
const syncer::EntityData& entity_data) const { … }
std::string ContactInfoSyncBridge::GetClientTag(
const syncer::EntityData& entity_data) { … }
std::string ContactInfoSyncBridge::GetStorageKey(
const syncer::EntityData& entity_data) { … }
void ContactInfoSyncBridge::AutofillProfileChanged(
const AutofillProfileChange& change) { … }
void ContactInfoSyncBridge::ApplyDisableSyncChanges(
std::unique_ptr<syncer::MetadataChangeList> delete_metadata_change_list) { … }
sync_pb::EntitySpecifics
ContactInfoSyncBridge::TrimAllSupportedFieldsFromRemoteSpecifics(
const sync_pb::EntitySpecifics& entity_specifics) const { … }
const sync_pb::ContactInfoSpecifics&
ContactInfoSyncBridge::GetPossiblyTrimmedContactInfoSpecificsDataFromProcessor(
const std::string& storage_key) { … }
bool ContactInfoSyncBridge::SyncMetadataCacheContainsSupportedFields(
const syncer::EntityMetadataMap& metadata_map) const { … }
AddressAutofillTable* ContactInfoSyncBridge::GetAutofillTable() { … }
AutofillSyncMetadataTable* ContactInfoSyncBridge::GetSyncMetadataStore() { … }
std::unique_ptr<syncer::MutableDataBatch>
ContactInfoSyncBridge::GetDataAndFilter(
base::RepeatingCallback<bool(const std::string&)> filter) { … }
void ContactInfoSyncBridge::LoadMetadata() { … }
}