Chromium Code Reviews| 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 12db5310dad9ac71ac55eb2383b601ff0ce5d071..1bc426171dcbf5b5b82629d66629b7e3c2c42de8 100644 |
| --- a/content/child/service_worker/web_service_worker_registration_impl.cc |
| +++ b/content/child/service_worker/web_service_worker_registration_impl.cc |
| @@ -20,8 +20,10 @@ WebServiceWorkerRegistrationImpl::QueuedTask::QueuedTask( |
| } |
| WebServiceWorkerRegistrationImpl::WebServiceWorkerRegistrationImpl( |
| + int provider_id, |
| scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref) |
| - : handle_ref_(handle_ref.Pass()), |
| + : provider_id_(provider_id), |
| + handle_ref_(handle_ref.Pass()), |
| proxy_(NULL) { |
| DCHECK(handle_ref_); |
| DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId, |
| @@ -112,6 +114,14 @@ blink::WebURL WebServiceWorkerRegistrationImpl::scope() const { |
| return handle_ref_->scope(); |
| } |
| +void WebServiceWorkerRegistrationImpl::unregister( |
| + UnregisterCallbacks* callbacks) { |
| + ServiceWorkerDispatcher* dispatcher = |
| + ServiceWorkerDispatcher::GetThreadSpecificInstance(); |
| + DCHECK(dispatcher); |
| + dispatcher->UnregisterServiceWorker(provider_id_, scope(), callbacks); |
|
kinuko
2015/02/03 08:02:11
If a registration outlives the document (and its p
nhiroki
2015/02/03 12:59:37
Good point. I understand that WebSWRegistration mu
|
| +} |
| + |
| int64 WebServiceWorkerRegistrationImpl::registration_id() const { |
| return handle_ref_->registration_id(); |
| } |