Chromium Code Reviews| Index: content/browser/service_worker/service_worker_quota_client.h |
| diff --git a/content/browser/service_worker/service_worker_quota_client.h b/content/browser/service_worker/service_worker_quota_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7f293943fb152dba118194b20ec7298d0b04304b |
| --- /dev/null |
| +++ b/content/browser/service_worker/service_worker_quota_client.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
jsbell
2014/10/13 20:54:26
Per http://www.chromium.org/developers/coding-styl
dmurph
2014/10/14 21:04:50
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_QUOTA_CLIENT_H_ |
| +#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_QUOTA_CLIENT_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "content/common/content_export.h" |
| +#include "storage/browser/quota/quota_client.h" |
| + |
| +namespace content { |
| +class ServiceWorkerContextWrapper; |
| + |
| +class ServiceWorkerQuotaClient : public storage::QuotaClient { |
| + public: |
| + virtual ~ServiceWorkerQuotaClient(); |
| + |
| + // QuotaClient method overrides |
| + virtual ID id() const override; |
| + virtual void OnQuotaManagerDestroyed() override; |
| + virtual void GetOriginUsage(const GURL& origin, |
| + storage::StorageType type, |
| + const GetUsageCallback& callback) override; |
| + virtual void GetOriginsForType(storage::StorageType type, |
| + const GetOriginsCallback& callback) override; |
| + virtual void GetOriginsForHost(storage::StorageType type, |
| + const std::string& host, |
| + const GetOriginsCallback& callback) override; |
| + virtual void DeleteOriginData(const GURL& origin, |
| + storage::StorageType type, |
| + const DeletionCallback& callback) override; |
| + virtual bool DoesSupport(storage::StorageType type) const override; |
| + |
| + private: |
| + friend class ServiceWorkerContextWrapper; |
| + friend class ServiceWorkerQuotaClientTest; |
| + |
| + CONTENT_EXPORT |
| + explicit ServiceWorkerQuotaClient(ServiceWorkerContextWrapper* context); |
|
jsbell
2014/10/13 20:54:26
nit: can you wrap after the ( so that 'CONTENT_EXP
dmurph
2014/10/14 21:04:50
Done.
|
| + |
| + scoped_refptr<ServiceWorkerContextWrapper> context_; |
|
michaeln
2014/10/14 00:50:31
ty!
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ServiceWorkerQuotaClient); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_QUOTA_CLIENT_H_ |