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

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: jochen 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
« no previous file with comments | « content/common/push_messaging_messages.h ('k') | content/public/common/push_messaging_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..624efb11a0cf08a20fc745f0d9a96c5bc56daf6c 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() {}
@@ -49,6 +50,12 @@ class CONTENT_EXPORT PushMessagingService {
const std::string& sender_id,
const RegisterCallback& callback) = 0;
+ // Unregister an origin and its associated service worker registration id from
+ // the push service.
+ virtual void Unregister(const GURL& requesting_origin,
+ int64 service_worker_registration_id,
+ const UnregisterCallback& callback) = 0;
+
// Check whether the requester has permission to register for Push
// Messages
// TODO(mvanouwerkerk): Delete once the Push API flows through platform.
« no previous file with comments | « content/common/push_messaging_messages.h ('k') | content/public/common/push_messaging_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698