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

Unified Diff: content/child/notifications/notification_manager.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
« no previous file with comments | « content/child/geofencing/geofencing_dispatcher.cc ('k') | content/child/push_messaging/push_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/notifications/notification_manager.cc
diff --git a/content/child/notifications/notification_manager.cc b/content/child/notifications/notification_manager.cc
index 95195455295633da3dab73e4b12351c0e8c3303e..19ac1c3015955e519d675221ba5991c68c7a5d4d 100644
--- a/content/child/notifications/notification_manager.cc
+++ b/content/child/notifications/notification_manager.cc
@@ -291,9 +291,8 @@ void NotificationManager::OnDidGetNotifications(
if (!callbacks)
return;
- scoped_ptr<blink::WebVector<blink::WebPersistentNotificationInfo>>
- notifications(new blink::WebVector<blink::WebPersistentNotificationInfo>(
- notification_infos.size()));
+ blink::WebVector<blink::WebPersistentNotificationInfo> notifications(
+ notification_infos.size());
for (size_t i = 0; i < notification_infos.size(); ++i) {
blink::WebPersistentNotificationInfo web_notification_info;
@@ -301,10 +300,10 @@ void NotificationManager::OnDidGetNotifications(
web_notification_info.data =
ToWebNotificationData(notification_infos[i].second);
- (*notifications)[i] = web_notification_info;
+ notifications[i] = web_notification_info;
}
- callbacks->onSuccess(notifications.release());
+ callbacks->onSuccess(notifications);
pending_get_notification_requests_.Remove(request_id);
}
« no previous file with comments | « content/child/geofencing/geofencing_dispatcher.cc ('k') | content/child/push_messaging/push_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698