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

Unified Diff: Source/modules/push_messaging/PushError.cpp

Issue 1314493008: Add a PermissionDeniedError, update Push API public API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: Source/modules/push_messaging/PushError.cpp
diff --git a/Source/modules/push_messaging/PushError.cpp b/Source/modules/push_messaging/PushError.cpp
index f095d6732a9855d4763dce6cfeeea0e0947de102..7cc7beafa2b6010ed08c69d1aa683f6c3d18026d 100644
--- a/Source/modules/push_messaging/PushError.cpp
+++ b/Source/modules/push_messaging/PushError.cpp
@@ -21,6 +21,8 @@ DOMException* PushError::take(ScriptPromiseResolver*, const WebPushError& webErr
return DOMException::create(NotFoundError, webError.message);
case WebPushError::ErrorTypeNotSupported:
return DOMException::create(NotSupportedError, webError.message);
+ case WebPushError::ErrorTypePermissionDenied:
+ return DOMException::create(PermissionDeniedError, webError.message);
case WebPushError::ErrorTypeUnknown:
return DOMException::create(UnknownError, webError.message);
}

Powered by Google App Engine
This is Rietveld 408576698