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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_impl.h

Issue 1231613005: Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 5 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/push_messaging/push_messaging_service_impl.h
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h
index 333497c2725b5e76160cd1ab956befc55ba6c42d..b27745b9692b24e93b1e9f5d79bbfc472fe244e8 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h
@@ -143,12 +143,25 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const std::string& subscription_id,
gcm::GCMClient::Result result);
+ void DidSubscribeWithPublicKey(
+ const PushMessagingAppIdentifier& app_identifier,
+ const content::PushMessagingService::RegisterCallback& callback,
+ const std::string& subscription_id,
+ const std::string& public_key);
+
void DidRequestPermission(
const PushMessagingAppIdentifier& app_identifier,
const std::string& sender_id,
const content::PushMessagingService::RegisterCallback& callback,
content::PermissionStatus permission_status);
+ // GetPublicEncryptionKey method ---------------------------------------------
+
+ void DidGetPublicKey(
+ const PushMessagingService::PublicKeyCallback& callback,
+ const std::string& public_key) const;
+
+
// Unsubscribe methods -------------------------------------------------------
void Unsubscribe(const std::string& app_id,
@@ -173,6 +186,9 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
// Checks if a given origin is allowed to use Push.
bool IsPermissionSet(const GURL& origin);
+ // Returns whether incoming messages should support payloads.
+ bool AreMessagePayloadsEnabled() const;
+
gcm::GCMDriver* GetGCMDriver() const;
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698