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

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

Issue 1235083006: CallbackPromiseAdapter types should be more compatible with WebCallbacks (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-callbacks-3
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: 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 515c3fe5cf0f487fec5a8b414c7564b260f06ba9..dd0c610c2eaf4316d8054ecfb4db6e4dad2adc28 100644
--- a/content/child/push_messaging/push_provider.cc
+++ b/content/child/push_messaging/push_provider.cc
@@ -183,7 +183,7 @@ void PushProvider::OnUnsubscribeSuccess(int request_id, bool did_unsubscribe) {
if (!callbacks)
return;
- callbacks->onSuccess(&did_unsubscribe);
+ callbacks->onSuccess(did_unsubscribe);
unsubscribe_callbacks_.Remove(request_id);
}
@@ -197,9 +197,8 @@ void PushProvider::OnUnsubscribeError(
if (!callbacks)
return;
- scoped_ptr<blink::WebPushError> error(new blink::WebPushError(
+ callbacks->onError(blink::WebPushError(
error_type, blink::WebString::fromUTF8(error_message)));
- callbacks->onError(error.release());
unsubscribe_callbacks_.Remove(request_id);
}
« no previous file with comments | « content/child/notifications/notification_manager.cc ('k') | content/child/service_worker/service_worker_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698