chromium/components/sessions/core/command_storage_manager.cc

// Copyright 2012 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/sessions/core/command_storage_manager.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/ranges/algorithm.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread.h"
#include "components/sessions/core/command_storage_backend.h"
#include "components/sessions/core/command_storage_manager_delegate.h"
#include "crypto/random.h"

namespace sessions {
namespace {

// Delay between when a command is received, and when we save it to the
// backend.
constexpr base::TimeDelta kSaveDelay =;

void AdaptGetLastSessionCommands(
    CommandStorageManager::GetCommandsCallback callback,
    CommandStorageBackend::ReadCommandsResult result) {}

}  // namespace

CommandStorageManager::CommandStorageManager(
    SessionType type,
    const base::FilePath& path,
    CommandStorageManagerDelegate* delegate,
    bool enable_crypto,
    const std::vector<uint8_t>& decryption_key,
    scoped_refptr<base::SequencedTaskRunner> backend_task_runner)
    :{}

CommandStorageManager::~CommandStorageManager() = default;

// static
scoped_refptr<base::SequencedTaskRunner>
CommandStorageManager::CreateDefaultBackendTaskRunner() {}

// static
std::vector<uint8_t> CommandStorageManager::CreateCryptoKey() {}

void CommandStorageManager::ScheduleCommand(
    std::unique_ptr<SessionCommand> command) {}

void CommandStorageManager::AppendRebuildCommand(
    std::unique_ptr<SessionCommand> command) {}

void CommandStorageManager::AppendRebuildCommands(
    std::vector<std::unique_ptr<SessionCommand>> commands) {}

void CommandStorageManager::EraseCommand(SessionCommand* old_command) {}

void CommandStorageManager::SwapCommand(
    SessionCommand* old_command,
    std::unique_ptr<SessionCommand> new_command) {}

void CommandStorageManager::ClearPendingCommands() {}

void CommandStorageManager::StartSaveTimer() {}

void CommandStorageManager::Save() {}

bool CommandStorageManager::HasPendingSave() const {}

void CommandStorageManager::MoveCurrentSessionToLastSession() {}

void CommandStorageManager::DeleteLastSession() {}

void CommandStorageManager::GetLastSessionCommands(
    GetCommandsCallback callback) {}

void CommandStorageManager::OnErrorWritingToFile() {}

}  // namespace sessions