| 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 f9e18f99aa9d2b0d43a143158766c38b72aebfe0..8a00525d973f9817282c3cb6b8010b140bdd9f04 100644
|
| --- a/content/child/service_worker/web_service_worker_registration_impl.cc
|
| +++ b/content/child/service_worker/web_service_worker_registration_impl.cc
|
| @@ -147,21 +147,17 @@ void WebServiceWorkerRegistrationImpl::unregister(
|
| }
|
|
|
| void WebServiceWorkerRegistrationImpl::enableNavigationPreload(
|
| - WebEnableNavigationPreloadCallbacks* callbacks) {
|
| - std::unique_ptr<WebEnableNavigationPreloadCallbacks> owned_callbacks(
|
| - callbacks);
|
| - // TODO(falken): Implement this.
|
| - owned_callbacks->onError(blink::WebServiceWorkerError(
|
| - blink::WebServiceWorkerError::ErrorTypeAbort, "Not implemented"));
|
| -}
|
| -
|
| -void WebServiceWorkerRegistrationImpl::disableNavigationPreload(
|
| - WebDisableNavigationPreloadCallbacks* callbacks) {
|
| - std::unique_ptr<WebDisableNavigationPreloadCallbacks> owned_callbacks(
|
| - callbacks);
|
| - // TODO(falken): Implement this.
|
| - owned_callbacks->onError(blink::WebServiceWorkerError(
|
| - blink::WebServiceWorkerError::ErrorTypeAbort, "Not implemented"));
|
| + bool enable,
|
| + blink::WebServiceWorkerProvider* provider,
|
| + std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks) {
|
| + WebServiceWorkerProviderImpl* provider_impl =
|
| + static_cast<WebServiceWorkerProviderImpl*>(provider);
|
| + ServiceWorkerDispatcher* dispatcher =
|
| + ServiceWorkerDispatcher::GetThreadSpecificInstance();
|
| + DCHECK(dispatcher);
|
| + dispatcher->EnableNavigationPreload(provider_impl->provider_id(),
|
| + registration_id(), enable,
|
| + std::move(callbacks));
|
| }
|
|
|
| int64_t WebServiceWorkerRegistrationImpl::registration_id() const {
|
|
|