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

Unified Diff: content/child/push_messaging/push_provider.cc

Issue 2436393002: Disallow repeated PushManager.subscribes with different sender ids (Closed)
Patch Set: Rename registration_id -> push_registration_id Created 4 years, 2 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/child/push_messaging/push_provider.cc
diff --git a/content/child/push_messaging/push_provider.cc b/content/child/push_messaging/push_provider.cc
index 2f8bc2ef1c436734931ab949fd4f570762adfb83..d1f349ab246c5185aaa25c01321c3b2006cef877 100644
--- a/content/child/push_messaging/push_provider.cc
+++ b/content/child/push_messaging/push_provider.cc
@@ -45,6 +45,9 @@ const blink::WebPushError PushRegistrationStatusToWebPushError(
case PUSH_REGISTRATION_STATUS_PERMISSION_DENIED:
error_type = blink::WebPushError::ErrorTypeNotAllowed;
break;
+ case PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH:
+ error_type = blink::WebPushError::ErrorTypeInvalidState;
+ break;
case PUSH_REGISTRATION_STATUS_SUCCESS_FROM_PUSH_SERVICE:
case PUSH_REGISTRATION_STATUS_NO_SERVICE_WORKER:
case PUSH_REGISTRATION_STATUS_SERVICE_NOT_AVAILABLE:

Powered by Google App Engine
This is Rietveld 408576698