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

Unified Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 914693002: Push API: Fix unsubscribing from GCM on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete PushEventNoPermission test Created 5 years, 10 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: chrome/browser/services/gcm/push_messaging_service_impl.h
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.h b/chrome/browser/services/gcm/push_messaging_service_impl.h
index edc4548424815c0888ba14c7a8b03e2002e9806c..c5cb50083d31a23c4397fea7c483c163cf44f839 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.h
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.h
@@ -69,6 +69,7 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
void Unregister(
const GURL& requesting_origin,
int64 service_worker_registration_id,
+ const std::string& sender_id,
bool retry_on_failure,
const content::PushMessagingService::UnregisterCallback&) override;
blink::WebPushPermissionStatus GetPermissionStatus(
@@ -88,6 +89,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
void IncreasePushRegistrationCount(int add, bool is_pending);
void DecreasePushRegistrationCount(int subtract, bool was_pending);
+ // OnMessage methods ---------------------------------------------------------
+
void DeliverMessageCallback(const std::string& app_id_guid,
const GURL& requesting_origin,
int64 service_worker_registration_id,
@@ -109,6 +112,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
bool success,
bool not_found);
+ // Register methods ----------------------------------------------------------
+
void RegisterEnd(
const content::PushMessagingService::RegisterCallback& callback,
const std::string& registration_id,
@@ -126,7 +131,10 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const content::PushMessagingService::RegisterCallback& callback,
bool allow);
+ // Unregister methods --------------------------------------------------------
+
void Unregister(const std::string& app_id_guid,
+ const std::string& sender_id,
bool retry_on_failure,
const content::PushMessagingService::UnregisterCallback&);
@@ -135,7 +143,15 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const content::PushMessagingService::UnregisterCallback&,
GCMClient::Result result);
- // Helper method that checks if a given origin is allowed to use Push.
+ // OnContentSettingChanged methods -------------------------------------------
+
+ void UnregisterBecausePermissionRevoked(const PushMessagingApplicationId& id,
+ const std::string& sender_id,
+ bool success, bool not_found);
+
+ // Helper methods ------------------------------------------------------------
+
+ // Checks if a given origin is allowed to use Push.
bool HasPermission(const GURL& origin);
GCMProfileService* gcm_profile_service_; // It owns us.
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_browsertest.cc ('k') | chrome/browser/services/gcm/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698