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

Unified Diff: content/browser/cache_storage/cache_storage.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
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cache_storage/cache_storage.h
diff --git a/content/browser/cache_storage/cache_storage.h b/content/browser/cache_storage/cache_storage.h
index 97492ea29dde964b68cc3f4200a17c256c4a2f2b..2cea28b2cd7a281dc0f9b782e9945d1360055375 100644
--- a/content/browser/cache_storage/cache_storage.h
+++ b/content/browser/cache_storage/cache_storage.h
@@ -138,6 +138,7 @@
const CacheAndErrorCallback& callback,
scoped_refptr<CacheStorageCache> cache);
void CreateCacheDidWriteIndex(const CacheAndErrorCallback& callback,
+ scoped_refptr<CacheStorageCache> cache,
bool success);
// The HasCache callbacks are below.
@@ -151,6 +152,7 @@
void DeleteCacheDidClose(const std::string& cache_name,
const BoolAndErrorCallback& callback,
const StringVector& ordered_cache_names,
+ scoped_refptr<CacheStorageCache> cache,
int64_t cache_size);
void DeleteCacheDidWriteIndex(const std::string& cache_name,
const BoolAndErrorCallback& callback,
@@ -166,7 +168,8 @@
void MatchCacheImpl(const std::string& cache_name,
std::unique_ptr<ServiceWorkerFetchRequest> request,
const CacheStorageCache::ResponseCallback& callback);
- void MatchCacheDidMatch(const CacheStorageCache::ResponseCallback& callback,
+ void MatchCacheDidMatch(scoped_refptr<CacheStorageCache> cache,
+ const CacheStorageCache::ResponseCallback& callback,
CacheStorageError error,
std::unique_ptr<ServiceWorkerResponse> response,
std::unique_ptr<storage::BlobDataHandle> handle);
@@ -175,6 +178,7 @@
void MatchAllCachesImpl(std::unique_ptr<ServiceWorkerFetchRequest> request,
const CacheStorageCache::ResponseCallback& callback);
void MatchAllCachesDidMatch(
+ scoped_refptr<CacheStorageCache> cache,
CacheMatchResponse* out_match_response,
const base::Closure& barrier_closure,
CacheStorageError error,
@@ -187,8 +191,6 @@
void GetSizeThenCloseAllCachesImpl(const SizeCallback& callback);
void SizeImpl(const SizeCallback& callback);
- void SizeRetrievedFromAllCaches(std::unique_ptr<int64_t> accumulator,
- const CacheStorage::SizeCallback& callback);
void PendingClosure(const base::Closure& callback);
void PendingBoolAndErrorCallback(const BoolAndErrorCallback& callback,
@@ -241,10 +243,6 @@
// The origin that this CacheStorage is associated with.
GURL origin_;
- // Used to keep caches alive during async operations.
- scoped_refptr<CacheStorageCache> callback_cache_;
- std::vector<scoped_refptr<CacheStorageCache>> callback_caches_;
-
base::WeakPtrFactory<CacheStorage> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(CacheStorage);
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698