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

Unified Diff: content/public/browser/push_messaging_service.h

Issue 793403002: Implement WebPushProvider.unregister() in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mvan_2
Patch Set: review comments 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
Index: content/public/browser/push_messaging_service.h
diff --git a/content/public/browser/push_messaging_service.h b/content/public/browser/push_messaging_service.h
index fdc92f432d49789e98dab1c6136fc5e6e84a029a..d588354d0e782d3efb7a10cf1225546899bf915b 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -19,9 +19,10 @@ namespace content {
// push messaging services like GCM. Must only be used on the UI thread.
class CONTENT_EXPORT PushMessagingService {
public:
- typedef base::Callback<void(const std::string& /* registration_id */,
- PushRegistrationStatus /* status */)>
- RegisterCallback;
+ using RegisterCallback =
+ base::Callback<void(const std::string& /* registration_id */,
+ PushRegistrationStatus /* status */)>;
+ using UnregisterCallback = base::Callback<void(PushUnregistrationStatus)>;
virtual ~PushMessagingService() {}
@@ -64,6 +65,12 @@ class CONTENT_EXPORT PushMessagingService {
virtual blink::WebPushPermissionStatus GetPermissionStatus(
const GURL& requesting_origin,
const GURL& embedding_origin) = 0;
+
+ // Unregister an origin and its associated service worker registration id from
+ // the push service.
+ virtual void Unregister(const GURL& requesting_origin,
johnme 2014/12/16 16:31:59 Please move this below RegisterFromWorker. Remembe
mlamouri (slow - plz ping) 2014/12/16 18:26:16 Done.
+ int64 service_worker_registration_id,
+ const UnregisterCallback& callback) = 0;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698