#include "components/autofill/core/browser/webdata/autofill_sync_metadata_table.h"
#include "components/autofill/core/browser/webdata/autofill_table_utils.h"
#include "components/sync/base/data_type.h"
#include "components/sync/model/metadata_batch.h"
#include "components/sync/protocol/data_type_state.pb.h"
#include "components/sync/protocol/entity_metadata.pb.h"
#include "components/webdata/common/web_database.h"
#include "sql/statement.h"
namespace autofill {
namespace {
constexpr std::string_view kAutofillSyncMetadataTable = …;
constexpr std::string_view kModelType = …;
constexpr std::string_view kStorageKey = …;
constexpr std::string_view kValue = …;
constexpr std::string_view kAutofillDataTypeStateTable = …;
WebDatabaseTable::TypeKey GetKey() { … }
}
AutofillSyncMetadataTable::AutofillSyncMetadataTable() = default;
AutofillSyncMetadataTable::~AutofillSyncMetadataTable() = default;
AutofillSyncMetadataTable* AutofillSyncMetadataTable::FromWebDatabase(
WebDatabase* db) { … }
bool AutofillSyncMetadataTable::SupportsMetadataForDataType(
syncer::DataType data_type) { … }
WebDatabaseTable::TypeKey AutofillSyncMetadataTable::GetTypeKey() const { … }
bool AutofillSyncMetadataTable::CreateTablesIfNecessary() { … }
bool AutofillSyncMetadataTable::MigrateToVersion(
int version,
bool* update_compatible_version) { … }
bool AutofillSyncMetadataTable::GetAllSyncMetadata(
syncer::DataType data_type,
syncer::MetadataBatch* metadata_batch) { … }
bool AutofillSyncMetadataTable::DeleteAllSyncMetadata(
syncer::DataType data_type) { … }
bool AutofillSyncMetadataTable::UpdateEntityMetadata(
syncer::DataType data_type,
const std::string& storage_key,
const sync_pb::EntityMetadata& metadata) { … }
bool AutofillSyncMetadataTable::ClearEntityMetadata(
syncer::DataType data_type,
const std::string& storage_key) { … }
bool AutofillSyncMetadataTable::UpdateDataTypeState(
syncer::DataType data_type,
const sync_pb::DataTypeState& data_type_state) { … }
bool AutofillSyncMetadataTable::ClearDataTypeState(syncer::DataType data_type) { … }
int AutofillSyncMetadataTable::GetKeyValueForDataType(
syncer::DataType data_type) const { … }
bool AutofillSyncMetadataTable::GetAllSyncEntityMetadata(
syncer::DataType data_type,
syncer::MetadataBatch* metadata_batch) { … }
bool AutofillSyncMetadataTable::GetDataTypeState(
syncer::DataType data_type,
sync_pb::DataTypeState* state) { … }
bool AutofillSyncMetadataTable::InitAutofillSyncMetadataTable() { … }
bool AutofillSyncMetadataTable::InitDataTypeStateTable() { … }
}