#include "content/browser/service_worker/service_worker_quota_client.h"
#include <string>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/sequence_checker.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_usage_info.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
#include "url/origin.h"
StorageType;
QuotaClient;
namespace content {
namespace {
void ReportToQuotaStatus(QuotaClient::DeleteBucketDataCallback callback,
blink::ServiceWorkerStatusCode status) { … }
void FindUsageForStorageKey(QuotaClient::GetBucketUsageCallback callback,
blink::ServiceWorkerStatusCode status,
int64_t usage) { … }
}
ServiceWorkerQuotaClient::ServiceWorkerQuotaClient(
ServiceWorkerContextCore& context)
: … { … }
ServiceWorkerQuotaClient::~ServiceWorkerQuotaClient() { … }
void ServiceWorkerQuotaClient::GetBucketUsage(
const storage::BucketLocator& bucket,
GetBucketUsageCallback callback) { … }
void ServiceWorkerQuotaClient::GetStorageKeysForType(
StorageType type,
GetStorageKeysForTypeCallback callback) { … }
void ServiceWorkerQuotaClient::DeleteBucketData(
const storage::BucketLocator& bucket,
DeleteBucketDataCallback callback) { … }
void ServiceWorkerQuotaClient::PerformStorageCleanup(
blink::mojom::StorageType type,
PerformStorageCleanupCallback callback) { … }
}