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

Unified Diff: public/platform/WebServiceWorkerProvider.h

Issue 515083002: ServiceWorker: Change the return value of ServiceWorkerRegistration::unregister to boolean (1/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Apply 3-sided patch format Created 6 years, 4 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: public/platform/WebServiceWorkerProvider.h
diff --git a/public/platform/WebServiceWorkerProvider.h b/public/platform/WebServiceWorkerProvider.h
index 53dd504b28d57bc68a8ef178a0a4382cb0bc2dad..dd2104eb0f05ca9d2e0aefeadb38fd3148d8abd7 100644
--- a/public/platform/WebServiceWorkerProvider.h
+++ b/public/platform/WebServiceWorkerProvider.h
@@ -42,6 +42,8 @@ class WebServiceWorkerProviderClient;
class WebServiceWorkerRegistration;
struct WebServiceWorkerError;
+#define SERVICEWORKER_UNREGISTER_DISABLE_NEW_FEATURE
nhiroki 2014/08/28 10:13:21 Can you add FIXME comment and a link to the issue
shimazu 2014/08/29 07:07:07 Done.
+
// Created on the main thread, and may be passed to another script context
// thread (e.g. worker thread) later. All methods of this class must be called
// on the single script context thread.
@@ -54,15 +56,16 @@ public:
// The WebServiceWorkerRegistration and WebServiceWorkerError ownership are
// passed to the WebServiceWorkerRegistrationCallbacks implementation.
typedef WebCallbacks<WebServiceWorkerRegistration, WebServiceWorkerError> WebServiceWorkerRegistrationCallbacks;
+#ifdef SERVICEWORKER_UNREGISTER_DISABLE_NEW_FEATURE
+ typedef WebServiceWorkerRegistrationCallbacks WebServiceWorkerUnRegistrationCallbacks;
nhiroki 2014/08/28 10:13:21 nit: s/UnRegistration/Unregistration/
shimazu 2014/08/29 07:07:07 Done.
+#else
+ typedef WebCallbacks<bool, WebServiceWorkerError> WebServiceWorkerUnRegistrationCallbacks;
nhiroki 2014/08/28 10:13:21 ditto.
shimazu 2014/08/29 07:07:07 Done.
+#endif
virtual void registerServiceWorker(const WebURL& pattern, const WebURL& scriptUrl, WebServiceWorkerRegistrationCallbacks*) { }
- // Unregisters the ServiceWorker for a given scope. The provider
- // must always pass null to onSuccess.
- // FIXME: "unregister" does not provide a WebServiceWorkerRegistration,
- // revisit this to clean up the the callback type to not take a
- // WebServiceWorkerRegistration*.
- virtual void unregisterServiceWorker(const WebURL& pattern, WebServiceWorkerRegistrationCallbacks*) { }
+ // Unregisters the ServiceWorker for a given scope.
+ virtual void unregisterServiceWorker(const WebURL& pattern, WebServiceWorkerUnRegistrationCallbacks*) { }
virtual ~WebServiceWorkerProvider() { }
};

Powered by Google App Engine
This is Rietveld 408576698