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

Unified Diff: public/platform/WebPushProvider.h

Issue 793913002: Stub implementation for PushRegistration.unregister(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mvan_6
Patch Set: remove trace Created 6 years 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
« no previous file with comments | « Source/modules/push_messaging/PushRegistrationCallbacks.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebPushProvider.h
diff --git a/public/platform/WebPushProvider.h b/public/platform/WebPushProvider.h
index 4b5972e36211c4dbcc82067c4f86214a2d2d50a3..89698240eb10c2400dbd8dcb34f6d22f0eeca203 100644
--- a/public/platform/WebPushProvider.h
+++ b/public/platform/WebPushProvider.h
@@ -17,6 +17,7 @@ struct WebPushRegistration;
typedef WebCallbacks<WebPushRegistration, WebPushError> WebPushRegistrationCallbacks;
typedef WebCallbacks<WebPushPermissionStatus, void> WebPushPermissionStatusCallbacks;
+typedef WebCallbacks<bool, void> WebPushUnregisterCallbacks;
class WebPushProvider {
public:
@@ -28,15 +29,22 @@ public:
// Takes ownership of the WebPushRegistrationCallbacks.
// Does not take ownership of the WebServiceWorkerRegistration.
- virtual void unregister(WebServiceWorkerRegistration*, WebPushRegistrationCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
-
- // Takes ownership of the WebPushRegistrationCallbacks.
- // Does not take ownership of the WebServiceWorkerRegistration.
virtual void getRegistration(WebServiceWorkerRegistration*, WebPushRegistrationCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
// Takes ownership of the WebPushPermissionStatusCallbacks.
// Does not take ownership of the WebServiceWorkerRegistration.
virtual void getPermissionStatus(WebServiceWorkerRegistration*, WebPushPermissionStatusCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
+
+ // Takes ownership if the WebPushUnregisterCallbacks.
+ // Does not take ownership of the WebServiceWorkerRegistration.
+ virtual void unregister(WebServiceWorkerRegistration*, WebPushUnregisterCallbacks* callback)
+ {
+ // FIXME: this should call BLINK_ASSERT_NOT_REACHED() when Chromium will
+ // have an implementation.
+ bool result = true;
+ callback->onSuccess(&result);
+ delete callback;
+ }
};
} // namespace blink
« no previous file with comments | « Source/modules/push_messaging/PushRegistrationCallbacks.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698