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

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: browsertests and override fix 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..8ccf69be341cd44d0f56aea9be2c05ae37d56b57 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(bool)>;
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,
+ int64 service_worker_registration_id,
+ const UnregisterCallback& callback) = 0;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698