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

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

Issue 2040173002: [CacheStorage] Clean up CacheStorageCache lifetimes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify and caught one more reference 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 a62755fce03e47222752b3376f82ce216d38a6c9..c5b1fc1c71743bc59aa397f74be975b690917184 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 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
void OnCacheMatchCallback(
int thread_id,
int request_id,
- scoped_refptr<CacheStorageCache> cache,
+ CacheID cache_id,
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,
+ CacheID cache_id,
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,
+ CacheID cache_id,
CacheStorageError error,
std::unique_ptr<std::vector<ServiceWorkerResponse>> responses,
std::unique_ptr<CacheStorageCache::BlobDataHandles> blob_data_handles);
@@ -144,17 +144,16 @@ class CONTENT_EXPORT CacheStorageDispatcherHost : public BrowserMessageFilter {
void OnCacheKeysCallback(
int thread_id,
int request_id,
- scoped_refptr<CacheStorageCache> cache,
+ CacheID cache_id,
CacheStorageError error,
std::unique_ptr<CacheStorageCache::Requests> requests);
void OnCacheBatchCallback(int thread_id,
int request_id,
- scoped_refptr<CacheStorageCache> cache,
+ CacheID cache_id,
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.
+ // Hangs onto a scoped_refptr to |cache|. Returns a unique cache_id. Call
+ // DropCacheReference when the reference is no longer needed.
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