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

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

Issue 2413063003: service worker: Add promise boilerplate for NavigationPreload enable/disable (Closed)
Patch Set: more boilerplate Created 4 years, 2 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 ae2705ee0b568eb48704764e0a591b0f0746cd49..f9e18f99aa9d2b0d43a143158766c38b72aebfe0 100644
--- a/content/child/service_worker/web_service_worker_registration_impl.cc
+++ b/content/child/service_worker/web_service_worker_registration_impl.cc
@@ -13,6 +13,7 @@
#include "content/child/service_worker/web_service_worker_impl.h"
#include "content/child/service_worker/web_service_worker_provider_impl.h"
#include "content/common/service_worker/service_worker_types.h"
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h"
namespace content {
@@ -145,6 +146,24 @@ void WebServiceWorkerRegistrationImpl::unregister(
registration_id(), callbacks);
}
+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"));
+}
+
int64_t WebServiceWorkerRegistrationImpl::registration_id() const {
return handle_ref_->registration_id();
}

Powered by Google App Engine
This is Rietveld 408576698