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

Unified Diff: content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc

Issue 461343006: Fix Has dispatch ServiceWorker CacheStorage API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc
diff --git a/content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc b/content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc
index 750713ca032aae249b9070cdf690728a5fff1f00..6cde2878794144a67bdecc0d5e4ecd1f16931389 100644
--- a/content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc
+++ b/content/renderer/service_worker/service_worker_cache_storage_dispatcher.cc
@@ -74,7 +74,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageGetSuccess(
int cache_id) {
CacheStorageWithCacheCallbacks* callbacks =
get_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onSuccess(NULL);
get_callbacks_.Remove(request_id);
}
@@ -82,7 +81,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageGetSuccess(
void ServiceWorkerCacheStorageDispatcher::OnCacheStorageHasSuccess(
int request_id) {
CacheStorageCallbacks* callbacks = has_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onSuccess();
has_callbacks_.Remove(request_id);
}
@@ -92,7 +90,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageCreateSuccess(
int cache_id) {
CacheStorageWithCacheCallbacks* callbacks =
create_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onSuccess(NULL);
create_callbacks_.Remove(request_id);
}
@@ -100,7 +97,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageCreateSuccess(
void ServiceWorkerCacheStorageDispatcher::OnCacheStorageDeleteSuccess(
int request_id) {
CacheStorageCallbacks* callbacks = delete_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onSuccess();
delete_callbacks_.Remove(request_id);
}
@@ -109,7 +105,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageKeysSuccess(
int request_id,
const std::vector<base::string16>& keys) {
CacheStorageKeysCallbacks* callbacks = keys_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
blink::WebVector<blink::WebString> webKeys(keys.size());
for (size_t i = 0; i < keys.size(); ++i)
webKeys[i] = keys[i];
@@ -123,7 +118,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageGetError(
blink::WebServiceWorkerCacheError reason) {
CacheStorageWithCacheCallbacks* callbacks =
get_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onError(&reason);
get_callbacks_.Remove(request_id);
}
@@ -132,7 +126,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageHasError(
int request_id,
blink::WebServiceWorkerCacheError reason) {
CacheStorageCallbacks* callbacks = has_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onError(&reason);
has_callbacks_.Remove(request_id);
}
@@ -142,7 +135,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageCreateError(
blink::WebServiceWorkerCacheError reason) {
CacheStorageWithCacheCallbacks* callbacks =
create_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onError(&reason);
create_callbacks_.Remove(request_id);
}
@@ -151,7 +143,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageDeleteError(
int request_id,
blink::WebServiceWorkerCacheError reason) {
CacheStorageCallbacks* callbacks = delete_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onError(&reason);
delete_callbacks_.Remove(request_id);
}
@@ -160,7 +151,6 @@ void ServiceWorkerCacheStorageDispatcher::OnCacheStorageKeysError(
int request_id,
blink::WebServiceWorkerCacheError reason) {
CacheStorageKeysCallbacks* callbacks = keys_callbacks_.Lookup(request_id);
- DCHECK(callbacks);
callbacks->onError(&reason);
keys_callbacks_.Remove(request_id);
}
@@ -176,7 +166,7 @@ void ServiceWorkerCacheStorageDispatcher::dispatchGet(
void ServiceWorkerCacheStorageDispatcher::dispatchHas(
CacheStorageCallbacks* callbacks,
const blink::WebString& cacheName) {
- int request_id = delete_callbacks_.Add(callbacks);
+ int request_id = has_callbacks_.Add(callbacks);
script_context_->Send(new ServiceWorkerHostMsg_CacheStorageDelete(
jsbell 2014/08/22 18:40:31 Oops, this needed to be updated too - sends the wr
gavinp 2014/08/27 19:43:48 In fairness, the return value for Delete conforms
script_context_->GetRoutingID(), request_id, cacheName));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698