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

Unified Diff: content/child/push_messaging/push_provider.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/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 2f0293ef2345cdf5a652ee90a2070148b4b62bfb..0a92c28296023fea558a33872130d4065af5a36c 100644
--- a/content/child/push_messaging/push_provider.cc
+++ b/content/child/push_messaging/push_provider.cc
@@ -46,6 +46,9 @@ 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:
« no previous file with comments | « content/browser/push_messaging/push_messaging_message_filter.cc ('k') | content/public/common/push_messaging_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698