chromium/components/trusted_vault/test/fake_trusted_vault_client.cc

// Copyright 2023 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/trusted_vault/test/fake_trusted_vault_client.h"

#include <list>
#include <map>
#include <string>
#include <utility>
#include <vector>

#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/observer_list.h"
#include "base/task/sequenced_task_runner.h"
#include "components/signin/public/identity_manager/account_info.h"

namespace trusted_vault {

FakeTrustedVaultClient::CachedKeysPerUser::CachedKeysPerUser() = default;
FakeTrustedVaultClient::CachedKeysPerUser::~CachedKeysPerUser() = default;

FakeTrustedVaultClient::FakeServer::RecoveryMethod::RecoveryMethod(
    const std::vector<uint8_t>& public_key,
    int method_type_hint)
    :{}

FakeTrustedVaultClient::FakeServer::RecoveryMethod::RecoveryMethod(
    const RecoveryMethod&) = default;
FakeTrustedVaultClient::FakeServer::RecoveryMethod::~RecoveryMethod() = default;

FakeTrustedVaultClient::FakeServer::FakeServer() = default;
FakeTrustedVaultClient::FakeServer::~FakeServer() = default;

void FakeTrustedVaultClient::FakeServer::StoreKeysOnServer(
    const std::string& gaia_id,
    const std::vector<std::vector<uint8_t>>& keys) {}

void FakeTrustedVaultClient::FakeServer::MimicKeyRetrievalByUser(
    const std::string& gaia_id,
    TrustedVaultClient* client) {}

std::vector<std::vector<uint8_t>>
FakeTrustedVaultClient::FakeServer::RequestRotatedKeysFromServer(
    const std::string& gaia_id,
    const std::vector<uint8_t>& key_known_by_client) {}

void FakeTrustedVaultClient::FakeServer::AddRecoveryMethod(
    const std::string& gaia_id,
    const std::vector<uint8_t>& public_key,
    int method_type_hint) {}

std::vector<FakeTrustedVaultClient::FakeServer::RecoveryMethod>
FakeTrustedVaultClient::FakeServer::GetRecoveryMethods(
    const std::string& gaia_id) const {}

FakeTrustedVaultClient::FakeTrustedVaultClient(bool auto_complete_requests)
    :{}

FakeTrustedVaultClient::~FakeTrustedVaultClient() = default;

bool FakeTrustedVaultClient::CompleteAllPendingRequests() {}

void FakeTrustedVaultClient::SetIsRecoveryMethodRequired(
    bool is_recovery_method_required) {}

void FakeTrustedVaultClient::AddObserver(Observer* observer) {}

void FakeTrustedVaultClient::RemoveObserver(Observer* observer) {}

std::vector<std::vector<uint8_t>> FakeTrustedVaultClient::GetStoredKeys(
    const std::string& gaia_id) const {}

void FakeTrustedVaultClient::FetchKeys(
    const CoreAccountInfo& account_info,
    base::OnceCallback<void(const std::vector<std::vector<uint8_t>>&)>
        callback) {}

void FakeTrustedVaultClient::StoreKeys(
    const std::string& gaia_id,
    const std::vector<std::vector<uint8_t>>& keys,
    int last_key_version) {}

void FakeTrustedVaultClient::MarkLocalKeysAsStale(
    const CoreAccountInfo& account_info,
    base::OnceCallback<void(bool)> callback) {}

void FakeTrustedVaultClient::GetIsRecoverabilityDegraded(
    const CoreAccountInfo& account_info,
    base::OnceCallback<void(bool)> callback) {}

void FakeTrustedVaultClient::AddTrustedRecoveryMethod(
    const std::string& gaia_id,
    const std::vector<uint8_t>& public_key,
    int method_type_hint,
    base::OnceClosure callback) {}

void FakeTrustedVaultClient::ClearLocalDataForAccount(
    const CoreAccountInfo& account_info) {}

void FakeTrustedVaultClient::PostCompleteAllPendingRequests() {}

}  // namespace trusted_vault