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

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

Issue 1181973004: ServiceWorker: Route unregister() through WebServiceWorkerRegistration for refactoring (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ifdef Created 5 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
Index: content/child/service_worker/web_service_worker_registration_impl.cc
diff --git a/content/child/service_worker/web_service_worker_registration_impl.cc b/content/child/service_worker/web_service_worker_registration_impl.cc
index 40364c1ea6d64515d215b8e965d9dbe085d47c69..99addd0cf50a225b5388e973f35c0de89575bca1 100644
--- a/content/child/service_worker/web_service_worker_registration_impl.cc
+++ b/content/child/service_worker/web_service_worker_registration_impl.cc
@@ -124,6 +124,18 @@ void WebServiceWorkerRegistrationImpl::update(
registration_id());
}
+void WebServiceWorkerRegistrationImpl::unregister(
+ blink::WebServiceWorkerProvider* provider,
+ WebServiceWorkerUnregistrationCallbacks* callbacks) {
+ WebServiceWorkerProviderImpl* provider_impl =
+ static_cast<WebServiceWorkerProviderImpl*>(provider);
+ ServiceWorkerDispatcher* dispatcher =
+ ServiceWorkerDispatcher::GetThreadSpecificInstance();
+ DCHECK(dispatcher);
+ dispatcher->UnregisterServiceWorker(provider_impl->provider_id(),
+ registration_id(), callbacks);
+}
+
int64 WebServiceWorkerRegistrationImpl::registration_id() const {
return handle_ref_->registration_id();
}

Powered by Google App Engine
This is Rietveld 408576698