chromium/components/feed/core/v2/persistent_key_value_store_impl.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 "components/feed/core/v2/persistent_key_value_store_impl.h"

#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/rand_util.h"
#include "base/time/time.h"
#include "components/feed/core/proto/v2/keyvalue_store.pb.h"
#include "components/feed/core/v2/config.h"
#include "components/offline_pages/task/task.h"

namespace feed {
namespace {
kMaxEntriesInMemory;
Entry;
}  // namespace

// Eviction task functionality.
class EvictTask {};

PersistentKeyValueStoreImpl::Task::Task() = default;
PersistentKeyValueStoreImpl::Task::Task(TaskType task_type,
                                        ResultCallback callback)
    :{}
PersistentKeyValueStoreImpl::Task::Task(TaskType task_type,
                                        std::string key,
                                        ResultCallback callback)
    :{}
PersistentKeyValueStoreImpl::Task::Task(Task&&) noexcept = default;
PersistentKeyValueStoreImpl::Task::~Task() = default;

PersistentKeyValueStoreImpl::PersistentKeyValueStoreImpl(
    std::unique_ptr<leveldb_proto::ProtoDatabase<feedkvstore::Entry>> database)
    :{}

PersistentKeyValueStoreImpl::~PersistentKeyValueStoreImpl() = default;

void PersistentKeyValueStoreImpl::OnDatabaseInitialized(
    leveldb_proto::Enums::InitStatus status) {}

bool PersistentKeyValueStoreImpl::IsInitialized() const {}

void PersistentKeyValueStoreImpl::AddTask(Task task) {}

void PersistentKeyValueStoreImpl::ClearAll(ResultCallback callback) {}

void PersistentKeyValueStoreImpl::Put(const std::string& key,
                                      const std::string& value,
                                      ResultCallback callback) {}

void PersistentKeyValueStoreImpl::Get(const std::string& key,
                                      ResultCallback callback) {}

void PersistentKeyValueStoreImpl::Delete(const std::string& key,
                                         ResultCallback callback) {}

void PersistentKeyValueStoreImpl::EvictOldEntries(ResultCallback callback) {}

void PersistentKeyValueStoreImpl::StartTask(Task task) {}

void PersistentKeyValueStoreImpl::GetDone(
    Task task,
    bool ok,
    std::unique_ptr<feedkvstore::Entry> get_entry) {}

void PersistentKeyValueStoreImpl::TaskComplete(Task complete_task,
                                               Result result) {}

void PersistentKeyValueStoreImpl::TaskCompleteBool(Task complete_task,
                                                   bool ok) {}

}  // namespace feed