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

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

Issue 801393002: PushRegistration.unregister() can fail with a NetworkError. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@push_unregister
Patch Set: Created 6 years 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
« no previous file with comments | « Source/modules/push_messaging/PushError.cpp ('k') | public/platform/WebPushError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushRegistration.cpp
diff --git a/Source/modules/push_messaging/PushRegistration.cpp b/Source/modules/push_messaging/PushRegistration.cpp
index 83713fb00f76519612903129bd7abfab58f5b639..3aa35430f86c4c90895eaed2df12f111a44e4f75 100644
--- a/Source/modules/push_messaging/PushRegistration.cpp
+++ b/Source/modules/push_messaging/PushRegistration.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/CallbackPromiseAdapter.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "modules/push_messaging/PushError.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "public/platform/Platform.h"
#include "public/platform/WebPushProvider.h"
@@ -45,7 +46,7 @@ ScriptPromise PushRegistration::unregister(ScriptState* scriptState)
WebPushProvider* webPushProvider = Platform::current()->pushProvider();
ASSERT(webPushProvider);
- webPushProvider->unregister(m_serviceWorkerRegistration->webRegistration(), new CallbackPromiseAdapter<bool, void>(resolver));
+ webPushProvider->unregister(m_serviceWorkerRegistration->webRegistration(), new CallbackPromiseAdapter<bool, PushError>(resolver));
return promise;
}
« no previous file with comments | « Source/modules/push_messaging/PushError.cpp ('k') | public/platform/WebPushError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698