Index: content/browser/service_worker/service_worker_cache.h |
diff --git a/content/browser/service_worker/service_worker_cache.h b/content/browser/service_worker/service_worker_cache.h |
index 42393a29e1ea10cfff90b9b8babb2f788bd89d3e..29658473568e27cef2bd7c791fcc72337836b890 100644 |
--- a/content/browser/service_worker/service_worker_cache.h |
+++ b/content/browser/service_worker/service_worker_cache.h |
@@ -46,6 +46,10 @@ class CONTENT_EXPORT ServiceWorkerCache { |
scoped_ptr<ServiceWorkerResponse>, |
scoped_ptr<storage::BlobDataHandle>)> |
ResponseCallback; |
+ typedef std::vector<ServiceWorkerFetchRequest> Requests; |
+ typedef base::Callback<void(ErrorType, scoped_ptr<Requests>)> |
+ RequestsCallback; |
+ |
static scoped_ptr<ServiceWorkerCache> CreateMemoryCache( |
net::URLRequestContext* request_context, |
base::WeakPtr<storage::BlobStorageContext> blob_context); |
@@ -80,6 +84,11 @@ class CONTENT_EXPORT ServiceWorkerCache { |
void Delete(ServiceWorkerFetchRequest* request, |
const ErrorCallback& callback); |
+ // TODO(jkarlin): Have keys take an optional ServiceWorkerFetchRequest. |
+ // Returns ErrorTypeOK and a vector of requests if there are no errors. The |
+ // callback will always be called. |
+ void Keys(const RequestsCallback& callback); |
+ |
// Call to determine if CreateBackend must be called. |
bool HasCreatedBackend() const; |
@@ -87,6 +96,8 @@ class CONTENT_EXPORT ServiceWorkerCache { |
backend_ = backend.Pass(); |
} |
+ disk_cache::Backend* backend() const { return backend_.get(); } |
+ |
base::WeakPtr<ServiceWorkerCache> AsWeakPtr(); |
private: |