chromium/storage/browser/test/mock_quota_client.cc

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

#include "storage/browser/test/mock_quota_client.h"

#include <cstdint>
#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/singleton.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "storage/browser/quota/quota_client_type.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "url/origin.h"

namespace storage {

MockQuotaClient::MockQuotaClient(
    scoped_refptr<QuotaManagerProxy> quota_manager_proxy,
    QuotaClientType client_type,
    base::span<const UnmigratedStorageKeyData> mock_data)
    :{}

MockQuotaClient::~MockQuotaClient() = default;

void MockQuotaClient::AddBucketsData(
    const std::map<BucketLocator, int64_t>& mock_data) {}

void MockQuotaClient::ModifyBucketAndNotify(const BucketLocator& bucket,
                                            int64_t delta) {}

void MockQuotaClient::AddBucketToErrorSet(const BucketLocator& bucket) {}

base::Time MockQuotaClient::IncrementMockTime() {}

void MockQuotaClient::GetBucketUsage(const BucketLocator& bucket,
                                     GetBucketUsageCallback callback) {}

void MockQuotaClient::GetStorageKeysForType(
    blink::mojom::StorageType type,
    GetStorageKeysForTypeCallback callback) {}

void MockQuotaClient::DeleteBucketData(const BucketLocator& bucket,
                                       DeleteBucketDataCallback callback) {}

void MockQuotaClient::PerformStorageCleanup(
    blink::mojom::StorageType type,
    PerformStorageCleanupCallback callback) {}

void MockQuotaClient::RunGetBucketUsage(const BucketLocator& bucket,
                                        GetBucketUsageCallback callback) {}

void MockQuotaClient::RunGetStorageKeysForType(
    blink::mojom::StorageType type,
    GetStorageKeysForTypeCallback callback) {}

void MockQuotaClient::RunDeleteBucketData(const BucketLocator& bucket,
                                          DeleteBucketDataCallback callback) {}

}  // namespace storage