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

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

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Comment out PUSH_GETREGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE Created 3 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/push_messaging/push_messaging_app_identifier.h
diff --git a/chrome/browser/push_messaging/push_messaging_app_identifier.h b/chrome/browser/push_messaging/push_messaging_app_identifier.h
index bfcc681f429b0a36784d6a1365d85938f8f52a59..e13b0cc5b8d3c3f88e4304eed33a2d04a016a12e 100644
--- a/chrome/browser/push_messaging/push_messaging_app_identifier.h
+++ b/chrome/browser/push_messaging/push_messaging_app_identifier.h
@@ -43,6 +43,11 @@ class PushMessagingAppIdentifier {
const GURL& origin,
int64_t service_worker_registration_id);
+ // Generates a new app identifier for legacy GCM (not modern InstanceID).
+ static PushMessagingAppIdentifier LegacyGenerateForTesting(
Peter Beverloo 2017/03/20 23:50:13 It's unfortunate that this has to be public. Can w
johnme 2017/03/30 18:36:37 Done.
+ const GURL& origin,
+ int64_t service_worker_registration_id);
+
// Looks up an app identifier by app_id. If not found, is_null() will be true.
static PushMessagingAppIdentifier FindByAppId(Profile* profile,
const std::string& app_id);
@@ -101,6 +106,11 @@ class PushMessagingAppIdentifier {
friend class PushMessagingAppIdentifierTest;
FRIEND_TEST_ALL_PREFIXES(PushMessagingAppIdentifierTest, FindLegacy);
+ static PushMessagingAppIdentifier GenerateInternal(
+ const GURL& origin,
+ int64_t service_worker_registration_id,
+ bool use_instance_id);
+
// Constructs an invalid app identifier.
PushMessagingAppIdentifier();
// Constructs a valid app identifier.

Powered by Google App Engine
This is Rietveld 408576698