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

Unified Diff: Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « Source/modules/geofencing/GeofencingError.cpp ('k') | Source/modules/push_messaging/PushError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
diff --git a/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp b/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
index 2835cbf4e551c3f097757df77106ce2d4bb4bd6e..9d29a17eb7dbcfa56ff4dfa710d52e5cd1a5cffd 100644
--- a/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
+++ b/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
@@ -33,12 +33,12 @@ namespace {
// getNotifications() promise with a HeapVector owning Notifications.
class NotificationArray {
public:
- using WebType = OwnPtr<WebVector<WebPersistentNotificationInfo>>;
+ using WebType = const WebVector<WebPersistentNotificationInfo>&;
- static HeapVector<Member<Notification>> take(ScriptPromiseResolver* resolver, PassOwnPtr<WebVector<WebPersistentNotificationInfo>> notificationInfos)
+ static HeapVector<Member<Notification>> take(ScriptPromiseResolver* resolver, const WebVector<WebPersistentNotificationInfo>& notificationInfos)
{
HeapVector<Member<Notification>> notifications;
- for (const WebPersistentNotificationInfo& notificationInfo : *notificationInfos)
+ for (const WebPersistentNotificationInfo& notificationInfo : notificationInfos)
notifications.append(Notification::create(resolver->executionContext(), notificationInfo.persistentId, notificationInfo.data));
return notifications;
}
« no previous file with comments | « Source/modules/geofencing/GeofencingError.cpp ('k') | Source/modules/push_messaging/PushError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698