#include "storage/browser/test/mock_quota_manager_proxy.h"
#include <utility>
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "components/services/storage/public/mojom/quota_client.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace storage {
MockQuotaManagerProxy::MockQuotaManagerProxy(
MockQuotaManager* quota_manager,
scoped_refptr<base::SequencedTaskRunner> quota_manager_task_runner)
: … { … }
void MockQuotaManagerProxy::UpdateOrCreateBucket(
const BucketInitParams& params,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceCallback<void(QuotaErrorOr<BucketInfo>)> callback) { … }
QuotaErrorOr<BucketInfo> MockQuotaManagerProxy::GetOrCreateBucketSync(
const BucketInitParams& params) { … }
void MockQuotaManagerProxy::CreateBucketForTesting(
const blink::StorageKey& storage_key,
const std::string& bucket_name,
blink::mojom::StorageType storage_type,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceCallback<void(QuotaErrorOr<BucketInfo>)> callback) { … }
void MockQuotaManagerProxy::GetBucketByNameUnsafe(
const blink::StorageKey& storage_key,
const std::string& bucket_name,
blink::mojom::StorageType type,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceCallback<void(QuotaErrorOr<BucketInfo>)> callback) { … }
void MockQuotaManagerProxy::GetBucketById(
const BucketId& bucket_id,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceCallback<void(QuotaErrorOr<BucketInfo>)> callback) { … }
void MockQuotaManagerProxy::GetBucketsForStorageKey(
const blink::StorageKey& storage_key,
blink::mojom::StorageType type,
bool delete_expired,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceCallback<void(QuotaErrorOr<std::set<BucketInfo>>)> callback) { … }
void MockQuotaManagerProxy::GetUsageAndQuota(
const blink::StorageKey& storage_key,
blink::mojom::StorageType type,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
QuotaManager::UsageAndQuotaCallback callback) { … }
void MockQuotaManagerProxy::NotifyBucketAccessed(const BucketLocator& bucket,
base::Time access_time) { … }
void MockQuotaManagerProxy::NotifyBucketModified(
QuotaClientType client_id,
const BucketLocator& bucket,
std::optional<int64_t> delta,
base::Time modification_time,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
base::OnceClosure callback) { … }
MockQuotaManagerProxy::~MockQuotaManagerProxy() = default;
}