chromium/components/download/database/download_db_impl.cc

// Copyright 2018 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/download/database/download_db_impl.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/task/thread_pool.h"
#include "components/download/database/download_db_conversions.h"
#include "components/download/database/download_db_entry.h"
#include "components/download/database/proto/download_entry.pb.h"
#include "components/leveldb_proto/public/proto_database_provider.h"

namespace download {

namespace {

const int kMaxNumInitializeAttempts =;

ProtoKeyVector;
ProtoEntryVector;
ProtoKeyEntryVector;

// Returns the prefix to all keys in the database.
std::string GetDatabaseKeyPrefix(DownloadNamespace download_namespace) {}

// Check if an input string is under a given namespace.
bool IsUnderNameSpace(DownloadNamespace download_namespace,
                      const std::string& key) {}

void OnUpdateDone(bool success) {}

}  // namespace

DownloadDBImpl::DownloadDBImpl(
    DownloadNamespace download_namespace,
    const base::FilePath& database_dir,
    leveldb_proto::ProtoDatabaseProvider* db_provider)
    :{}

DownloadDBImpl::DownloadDBImpl(
    DownloadNamespace download_namespace,
    std::unique_ptr<leveldb_proto::ProtoDatabase<download_pb::DownloadDBEntry>>
        db)
    :{}

DownloadDBImpl::~DownloadDBImpl() = default;

bool DownloadDBImpl::IsInitialized() {}

void DownloadDBImpl::Initialize(DownloadDBCallback callback) {}

void DownloadDBImpl::DestroyAndReinitialize(DownloadDBCallback callback) {}

void DownloadDBImpl::AddOrReplace(const DownloadDBEntry& entry) {}

void DownloadDBImpl::AddOrReplaceEntries(
    const std::vector<DownloadDBEntry>& entries,
    DownloadDBCallback callback) {}

void DownloadDBImpl::LoadEntries(LoadEntriesCallback callback) {}

void DownloadDBImpl::Remove(const std::string& guid) {}

std::string DownloadDBImpl::GetEntryKey(const std::string& guid) const {}

void DownloadDBImpl::OnAllEntriesLoaded(
    LoadEntriesCallback callback,
    bool success,
    std::unique_ptr<ProtoEntryVector> entries) {}

void DownloadDBImpl::OnDatabaseInitialized(
    DownloadDBCallback callback,
    leveldb_proto::Enums::InitStatus status) {}

void DownloadDBImpl::OnDatabaseDestroyed(DownloadDBCallback callback,
                                         bool success) {}

void DownloadDBImpl::OnRemoveDone(bool success) {}

}  // namespace download