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

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

Issue 1851423003: Make Web Push use InstanceID tokens instead of GCM registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid4default
Patch Set: Rebase Created 4 years, 3 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: 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 d98c9a902bbc56647849d7617f0c3c1d0895ecb8..242f2bf88d154b277805546c2beb43a4bbbf7351 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -67,9 +67,12 @@ class CONTENT_EXPORT PushMessagingService {
const RegisterCallback& callback) = 0;
// Retrieves the encryption information associated with the subscription
- // associated to |origin| and |service_worker_registration_id|.
+ // associated to |origin| and |service_worker_registration_id|. |sender_id| is
+ // also required since an InstanceID might have multiple tokens associated
+ // with different senders, though in practice Push doesn't yet use that.
virtual void GetEncryptionInfo(const GURL& origin,
int64_t service_worker_registration_id,
+ const std::string& sender_id,
const EncryptionInfoCallback& callback) = 0;
// Unsubscribe the given |sender_id| from the push messaging service. The
@@ -104,6 +107,16 @@ class CONTENT_EXPORT PushMessagingService {
const GURL& origin,
int64_t service_worker_registration_id,
const base::Closure& callback);
+
+ // Stores a push subscription in the service worker for the given |origin|.
+ // Must only be used by tests.
+ static void StorePushSubscriptionForTesting(
+ BrowserContext* browser_context,
+ const GURL& origin,
+ int64_t service_worker_registration_id,
+ const std::string& subscription_id,
+ const std::string& sender_id,
+ const base::Closure& callback);
};
} // namespace content
« no previous file with comments | « content/browser/push_messaging/push_messaging_message_filter.cc ('k') | content/public/browser/push_messaging_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698