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

Unified Diff: content/public/common/push_messaging_status.cc

Issue 2436393002: Disallow repeated PushManager.subscribes with different sender ids (Closed)
Patch Set: Make error message more informative Created 4 years, 1 month 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/common/push_messaging_status.cc
diff --git a/content/public/common/push_messaging_status.cc b/content/public/common/push_messaging_status.cc
index 09a56f4be8645bb88ca4732f5964fb464166ad49..abee3207eff2ac45fd04b4a11b627257ebf74c73 100644
--- a/content/public/common/push_messaging_status.cc
+++ b/content/public/common/push_messaging_status.cc
@@ -52,6 +52,11 @@ const char* PushRegistrationStatusToString(PushRegistrationStatus status) {
case PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING:
return "Registration failed - missing applicationServerKey, and manifest "
"empty or missing";
+
+ case PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH:
+ return "Registration failed - A subscription with a different "
+ "applicationServerKey (or gcm_sender_id) already exists; to "
+ "change the applicationServerKey, unsubscribe then resubscribe.";
}
NOTREACHED();
return "";

Powered by Google App Engine
This is Rietveld 408576698