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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.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: Add const 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/browser/service_worker/service_worker_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index a0bdabf61db8196e2f0104d6e715dfa67d828a11..dfcaa8e673d945f4074bc199909fc7174b49a93f 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -595,12 +595,14 @@ void ServiceWorkerDispatcherHost::UnregistrationComplete(
int thread_id,
int request_id,
ServiceWorkerStatusCode status) {
- if (status != SERVICE_WORKER_OK) {
+ if (status != SERVICE_WORKER_OK && status != SERVICE_WORKER_ERROR_NOT_FOUND) {
SendUnregistrationError(thread_id, request_id, status);
return;
}
-
- Send(new ServiceWorkerMsg_ServiceWorkerUnregistered(thread_id, request_id));
+ const bool is_success = (status == SERVICE_WORKER_OK);
+ Send(new ServiceWorkerMsg_ServiceWorkerUnregistered(thread_id,
+ request_id,
+ is_success));
TRACE_EVENT_ASYNC_END1(
"ServiceWorker",
"ServiceWorkerDispatcherHost::UnregisterServiceWorker",

Powered by Google App Engine
This is Rietveld 408576698