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

Unified Diff: content/renderer/push_messaging/push_messaging_dispatcher.cc

Issue 1291023005: [PushMessaging] Use appopriate type parameters for WebCallbacks (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « content/child/push_messaging/push_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/push_messaging/push_messaging_dispatcher.cc
diff --git a/content/renderer/push_messaging/push_messaging_dispatcher.cc b/content/renderer/push_messaging/push_messaging_dispatcher.cc
index ec1f8eb3be2b905dafbbf6e49187588dc39db653..ddb870eb76a5496d242e392f4d42a8a99645d008 100644
--- a/content/renderer/push_messaging/push_messaging_dispatcher.cc
+++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc
@@ -90,9 +90,8 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentSuccess(
subscription_callbacks_.Lookup(request_id);
DCHECK(callbacks);
- scoped_ptr<blink::WebPushSubscription> subscription(
- new blink::WebPushSubscription(endpoint, curve25519dh));
- callbacks->onSuccess(subscription.release());
+ callbacks->onSuccess(blink::adoptWebPtr(
+ new blink::WebPushSubscription(endpoint, curve25519dh)));
subscription_callbacks_.Remove(request_id);
}
@@ -104,10 +103,9 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentError(
subscription_callbacks_.Lookup(request_id);
DCHECK(callbacks);
- scoped_ptr<blink::WebPushError> error(new blink::WebPushError(
+ callbacks->onError(blink::WebPushError(
blink::WebPushError::ErrorTypeAbort,
blink::WebString::fromUTF8(PushRegistrationStatusToString(status))));
- callbacks->onError(error.release());
subscription_callbacks_.Remove(request_id);
}
« no previous file with comments | « content/child/push_messaging/push_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698