chromium/services/network/trust_tokens/trust_token_database_owner.cc

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

#include "services/network/trust_tokens/trust_token_database_owner.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "components/sqlite_proto/key_value_data.h"
#include "components/sqlite_proto/key_value_table.h"
#include "components/sqlite_proto/proto_table_manager.h"
#include "services/network/trust_tokens/proto/storage.pb.h"
#include "sql/database.h"

namespace network {

namespace {
const char kIssuerTableName[] =;
const char kToplevelTableName[] =;
const char kIssuerToplevelPairTableName[] =;

// When updating the database's schema, please increment the schema version.
constexpr int kCurrentSchemaVersion =;
}  // namespace

void TrustTokenDatabaseOwner::Create(
    base::OnceCallback<bool(sql::Database*)> db_opener,
    scoped_refptr<base::SequencedTaskRunner> db_task_runner,
    base::TimeDelta flush_delay_for_writes,
    base::OnceCallback<void(std::unique_ptr<TrustTokenDatabaseOwner>)>
        on_done_initializing) {}

TrustTokenDatabaseOwner::~TrustTokenDatabaseOwner() {}

sqlite_proto::KeyValueData<TrustTokenIssuerConfig>*
TrustTokenDatabaseOwner::IssuerData() {}

sqlite_proto::KeyValueData<TrustTokenToplevelConfig>*
TrustTokenDatabaseOwner::ToplevelData() {}

sqlite_proto::KeyValueData<TrustTokenIssuerToplevelPairConfig>*
TrustTokenDatabaseOwner::IssuerToplevelPairData() {}

// Marking NOINLINE saves a few hundred bytes of binary size.
NOINLINE TrustTokenDatabaseOwner::TrustTokenDatabaseOwner(
    base::OnceCallback<bool(sql::Database*)> db_opener,
    scoped_refptr<base::SequencedTaskRunner> db_task_runner,
    base::TimeDelta flush_delay_for_writes,
    base::OnceCallback<void(std::unique_ptr<TrustTokenDatabaseOwner>)>
        on_done_initializing)
    :{}

void TrustTokenDatabaseOwner::InitializeMembersOnDbSequence(
    base::OnceCallback<bool(sql::Database*)> db_opener) {}

void TrustTokenDatabaseOwner::FinishInitializationOnMainSequence() {}

}  // namespace network