#include "components/power_bookmarks/storage/power_bookmark_sync_metadata_database.h"
#include <memory>
#include "base/big_endian.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "components/sync/model/metadata_batch.h"
#include "components/sync/protocol/entity_metadata.pb.h"
#include "sql/statement.h"
namespace power_bookmarks {
namespace {
const char kPowerBookmarkDataTypeStateKey[] = …;
}
PowerBookmarkSyncMetadataDatabase::PowerBookmarkSyncMetadataDatabase(
sql::Database* db,
sql::MetaTable* meta_table)
: … { … }
PowerBookmarkSyncMetadataDatabase::~PowerBookmarkSyncMetadataDatabase() =
default;
bool PowerBookmarkSyncMetadataDatabase::Init() { … }
bool PowerBookmarkSyncMetadataDatabase::UpdateEntityMetadata(
syncer::DataType data_type,
const std::string& storage_key,
const sync_pb::EntityMetadata& metadata) { … }
bool PowerBookmarkSyncMetadataDatabase::ClearEntityMetadata(
syncer::DataType data_type,
const std::string& storage_key) { … }
bool PowerBookmarkSyncMetadataDatabase::UpdateDataTypeState(
syncer::DataType data_type,
const sync_pb::DataTypeState& data_type_state) { … }
bool PowerBookmarkSyncMetadataDatabase::ClearDataTypeState(
syncer::DataType data_type) { … }
std::unique_ptr<syncer::MetadataBatch>
PowerBookmarkSyncMetadataDatabase::GetAllSyncMetadata() { … }
bool PowerBookmarkSyncMetadataDatabase::GetAllSyncEntityMetadata(
syncer::MetadataBatch* metadata_batch) { … }
bool PowerBookmarkSyncMetadataDatabase::GetDataTypeState(
syncer::MetadataBatch* metadata_batch) const { … }
}