Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: content/browser/cache_storage/cache_storage_dispatcher_host.h

Issue 2040373006: Revert of [CacheStorage] Clean up CacheStorageCache lifetimes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c5b1fc1c71743bc59aa397f74be975b690917184..a62755fce03e47222752b3376f82ce216d38a6c9 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.h
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.h
@@ -118,21 +118,21 @@
void OnCacheMatchCallback(
int thread_id,
int request_id,
- CacheID cache_id,
+ scoped_refptr<CacheStorageCache> cache,
CacheStorageError error,
std::unique_ptr<ServiceWorkerResponse> response,
std::unique_ptr<storage::BlobDataHandle> blob_data_handle);
void OnCacheMatchAllCallbackAdapter(
int thread_id,
int request_id,
- CacheID cache_id,
+ scoped_refptr<CacheStorageCache> cache,
CacheStorageError error,
std::unique_ptr<ServiceWorkerResponse> response,
std::unique_ptr<storage::BlobDataHandle> blob_data_handle);
void OnCacheMatchAllCallback(
int thread_id,
int request_id,
- CacheID cache_id,
+ scoped_refptr<CacheStorageCache> cache,
CacheStorageError error,
std::unique_ptr<std::vector<ServiceWorkerResponse>> responses,
std::unique_ptr<CacheStorageCache::BlobDataHandles> blob_data_handles);
@@ -144,16 +144,17 @@
void OnCacheKeysCallback(
int thread_id,
int request_id,
- CacheID cache_id,
+ scoped_refptr<CacheStorageCache> cache,
CacheStorageError error,
std::unique_ptr<CacheStorageCache::Requests> requests);
void OnCacheBatchCallback(int thread_id,
int request_id,
- CacheID cache_id,
+ scoped_refptr<CacheStorageCache> cache,
CacheStorageError error);
- // Hangs onto a scoped_refptr to |cache|. Returns a unique cache_id. Call
- // DropCacheReference when the reference is no longer needed.
+ // 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);
void DropCacheReference(CacheID cache_id);
« no previous file with comments | « content/browser/cache_storage/cache_storage_cache.cc ('k') | content/browser/cache_storage/cache_storage_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698