chromium/components/power_bookmarks/storage/power_bookmark_sync_metadata_database.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Key in sql::MetaTable, the value is a serialization of syner::DataTypeState,
// which tracks the overall sync state of the power bookmark datatype.
const char kPowerBookmarkDataTypeStateKey[] =;

}  // namespace

// Description of database table:
//
// sync_metadata
//   storage_key      The guid of an entry in the saves table.
//   value            Serialized sync EntityMetadata, which tracks the sync
//                    state of each power bookmark entity.
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 {}

}  // namespace power_bookmarks