| Index: content/browser/cache_storage/cache_storage_dispatcher_host.h
|
| diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.h b/content/browser/cache_storage/cache_storage_dispatcher_host.h
|
| index a62755fce03e47222752b3376f82ce216d38a6c9..d937bac03486e5343e5a002e939dcf5575774754 100644
|
| --- a/content/browser/cache_storage/cache_storage_dispatcher_host.h
|
| +++ b/content/browser/cache_storage/cache_storage_dispatcher_host.h
|
| @@ -41,7 +41,8 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
|
| friend class base::DeleteHelper<CacheStorageDispatcherHost>;
|
|
|
| typedef int32_t CacheID; // TODO(jkarlin): Bump to 64 bit.
|
| - typedef std::map<CacheID, scoped_refptr<CacheStorageCache>> IDToCacheMap;
|
| + typedef std::map<CacheID, std::unique_ptr<CacheStorageCacheHandle>>
|
| + IDToCacheMap;
|
| typedef std::map<std::string, std::list<storage::BlobDataHandle>>
|
| UUIDToBlobDataHandleList;
|
|
|
| @@ -95,10 +96,11 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
|
| int request_id,
|
| bool has_cache,
|
| CacheStorageError error);
|
| - void OnCacheStorageOpenCallback(int thread_id,
|
| - int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| - CacheStorageError error);
|
| + void OnCacheStorageOpenCallback(
|
| + int thread_id,
|
| + int request_id,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| + CacheStorageError error);
|
| void OnCacheStorageDeleteCallback(int thread_id,
|
| int request_id,
|
| bool deleted,
|
| @@ -118,21 +120,21 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
|
| void OnCacheMatchCallback(
|
| int thread_id,
|
| int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| CacheStorageError error,
|
| std::unique_ptr<ServiceWorkerResponse> response,
|
| std::unique_ptr<storage::BlobDataHandle> blob_data_handle);
|
| void OnCacheMatchAllCallbackAdapter(
|
| int thread_id,
|
| int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| CacheStorageError error,
|
| std::unique_ptr<ServiceWorkerResponse> response,
|
| std::unique_ptr<storage::BlobDataHandle> blob_data_handle);
|
| void OnCacheMatchAllCallback(
|
| int thread_id,
|
| int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| CacheStorageError error,
|
| std::unique_ptr<std::vector<ServiceWorkerResponse>> responses,
|
| std::unique_ptr<CacheStorageCache::BlobDataHandles> blob_data_handles);
|
| @@ -144,18 +146,19 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
|
| void OnCacheKeysCallback(
|
| int thread_id,
|
| int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| CacheStorageError error,
|
| std::unique_ptr<CacheStorageCache::Requests> requests);
|
| - void OnCacheBatchCallback(int thread_id,
|
| - int request_id,
|
| - scoped_refptr<CacheStorageCache> cache,
|
| - CacheStorageError error);
|
| + void OnCacheBatchCallback(
|
| + int thread_id,
|
| + int request_id,
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle,
|
| + CacheStorageError error);
|
|
|
| - // Hangs onto a scoped_refptr for the cache if it isn't already doing so.
|
| - // Returns a unique cache_id. Call DropCacheReference when the client is done
|
| - // with this cache.
|
| - CacheID StoreCacheReference(scoped_refptr<CacheStorageCache> cache);
|
| + // Hangs onto a cache handle. Returns a unique cache_id. Call
|
| + // DropCacheReference when the reference is no longer needed.
|
| + CacheID StoreCacheReference(
|
| + std::unique_ptr<CacheStorageCacheHandle> cache_handle);
|
| void DropCacheReference(CacheID cache_id);
|
|
|
| // Stores blob handles while waiting for acknowledgement of receipt from the
|
|
|