| Index: content/browser/cache_storage/cache_storage_cache.h
|
| diff --git a/content/browser/cache_storage/cache_storage_cache.h b/content/browser/cache_storage/cache_storage_cache.h
|
| index c558e2e3f5fc4b5a0e73bb1f1f364ff34474c273..f52e2d3107d9867e960a28cd7e3576044cedfe0f 100644
|
| --- a/content/browser/cache_storage/cache_storage_cache.h
|
| +++ b/content/browser/cache_storage/cache_storage_cache.h
|
| @@ -74,17 +74,10 @@ class CONTENT_EXPORT CacheStorageCache
|
| void Match(scoped_ptr<ServiceWorkerFetchRequest> request,
|
| const ResponseCallback& callback);
|
|
|
| - // Puts the request and response object in the cache. The response body (if
|
| - // present) is stored in the cache, but not the request body. Returns
|
| - // ERROR_TYPE_OK on success.
|
| - void Put(scoped_ptr<ServiceWorkerFetchRequest> request,
|
| - scoped_ptr<ServiceWorkerResponse> response,
|
| - const ErrorCallback& callback);
|
| -
|
| - // Returns ErrorNotFound if not found. Otherwise deletes and returns
|
| - // ERROR_TYPE_OK.
|
| - void Delete(scoped_ptr<ServiceWorkerFetchRequest> request,
|
| - const ErrorCallback& callback);
|
| + // Runs given batch operations. This corresponds to the Batch Cache Operations
|
| + // algorithm in the spec.
|
| + void BatchOperation(const std::vector<CacheStorageBatchOperation>& operations,
|
| + const ErrorCallback& callback);
|
|
|
| // TODO(jkarlin): Have keys take an optional ServiceWorkerFetchRequest.
|
| // Returns ErrorTypeOK and a vector of requests if there are no errors.
|
| @@ -140,7 +133,11 @@ class CONTENT_EXPORT CacheStorageCache
|
| int rv);
|
| void MatchDoneWithBody(scoped_ptr<MatchContext> match_context);
|
|
|
| - // Put callbacks.
|
| + // Puts the request and response object in the cache. The response body (if
|
| + // present) is stored in the cache, but not the request body. Returns
|
| + // ERROR_TYPE_OK on success.
|
| + void Put(const CacheStorageBatchOperation& operation,
|
| + const ErrorCallback& callback);
|
| void PutImpl(scoped_ptr<PutContext> put_context);
|
| void PutDidDelete(scoped_ptr<PutContext> put_context, ErrorType delete_error);
|
| void PutDidCreateEntry(scoped_ptr<PutContext> put_context, int rv);
|
| @@ -152,7 +149,10 @@ class CONTENT_EXPORT CacheStorageCache
|
| disk_cache::ScopedEntryPtr entry,
|
| bool success);
|
|
|
| - // Delete callbacks
|
| + // Returns ErrorNotFound if not found. Otherwise deletes and returns
|
| + // ERROR_TYPE_OK.
|
| + void Delete(const CacheStorageBatchOperation& operation,
|
| + const ErrorCallback& callback);
|
| void DeleteImpl(scoped_ptr<ServiceWorkerFetchRequest> request,
|
| const ErrorCallback& callback);
|
| void DeleteDidOpenEntry(
|
|
|