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

Unified Diff: content/browser/service_worker/service_worker_cache_listener.cc

Issue 682383005: [ServiceWorkerCache] Keep the ServiceWorkerCache alive when handling cache IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 2 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 | « content/browser/service_worker/service_worker_cache_listener.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_cache_listener.cc
diff --git a/content/browser/service_worker/service_worker_cache_listener.cc b/content/browser/service_worker/service_worker_cache_listener.cc
index dd2f1507854687b22e93350402754941562ecd8d..911517acbbf14e181639e837c609a1838b12c2f8 100644
--- a/content/browser/service_worker/service_worker_cache_listener.cc
+++ b/content/browser/service_worker/service_worker_cache_listener.cc
@@ -183,7 +183,8 @@ void ServiceWorkerCacheListener::OnCacheMatch(
cache->Match(scoped_request.Pass(),
base::Bind(&ServiceWorkerCacheListener::OnCacheMatchCallback,
weak_factory_.GetWeakPtr(),
- request_id));
+ request_id,
+ cache));
}
void ServiceWorkerCacheListener::OnCacheMatchAll(
@@ -212,7 +213,8 @@ void ServiceWorkerCacheListener::OnCacheKeys(
cache->Keys(base::Bind(&ServiceWorkerCacheListener::OnCacheKeysCallback,
weak_factory_.GetWeakPtr(),
- request_id));
+ request_id,
+ cache));
}
void ServiceWorkerCacheListener::OnCacheBatch(
@@ -246,7 +248,8 @@ void ServiceWorkerCacheListener::OnCacheBatch(
cache->Delete(scoped_request.Pass(),
base::Bind(&ServiceWorkerCacheListener::OnCacheDeleteCallback,
weak_factory_.GetWeakPtr(),
- request_id));
+ request_id,
+ cache));
return;
}
@@ -263,7 +266,8 @@ void ServiceWorkerCacheListener::OnCacheBatch(
scoped_response.Pass(),
base::Bind(&ServiceWorkerCacheListener::OnCachePutCallback,
weak_factory_.GetWeakPtr(),
- request_id));
+ request_id,
+ cache));
return;
}
@@ -347,6 +351,7 @@ void ServiceWorkerCacheListener::OnCacheStorageKeysCallback(
void ServiceWorkerCacheListener::OnCacheMatchCallback(
int request_id,
+ const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerResponse> response,
scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
@@ -364,6 +369,7 @@ void ServiceWorkerCacheListener::OnCacheMatchCallback(
void ServiceWorkerCacheListener::OnCacheKeysCallback(
int request_id,
+ const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerCache::Requests> requests) {
if (error != ServiceWorkerCache::ErrorTypeOK) {
@@ -387,6 +393,7 @@ void ServiceWorkerCacheListener::OnCacheKeysCallback(
void ServiceWorkerCacheListener::OnCacheDeleteCallback(
int request_id,
+ const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error) {
if (error != ServiceWorkerCache::ErrorTypeOK) {
Send(ServiceWorkerMsg_CacheBatchError(
@@ -400,6 +407,7 @@ void ServiceWorkerCacheListener::OnCacheDeleteCallback(
void ServiceWorkerCacheListener::OnCachePutCallback(
int request_id,
+ const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerResponse> response,
scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
« no previous file with comments | « content/browser/service_worker/service_worker_cache_listener.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698