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

Unified Diff: content/child/service_worker/service_worker_dispatcher.cc

Issue 554573002: SWRegistration::unregister returns false when the registration is already unregistered. (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/child/service_worker/service_worker_dispatcher.cc
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 0a45eb405110e08fc192c2965ececc0f9598cc16..30b1fd08a5a09a9371c9a0255b5f576d97fce2f4 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -262,13 +262,14 @@ void ServiceWorkerDispatcher::OnRegistered(
void ServiceWorkerDispatcher::OnUnregistered(
int thread_id,
- int request_id) {
+ int request_id,
+ ServiceWorkerStatusCode status) {
WebServiceWorkerUnregistrationCallbacks* callbacks =
pending_unregistration_callbacks_.Lookup(request_id);
DCHECK(callbacks);
if (!callbacks)
return;
- bool is_success = true;
+ bool is_success = (status == SERVICE_WORKER_OK);
callbacks->onSuccess(&is_success);
pending_unregistration_callbacks_.Remove(request_id);
}

Powered by Google App Engine
This is Rietveld 408576698