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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/notifications/ServiceWorkerRegistrationNotifications.h" 5 #include "modules/notifications/ServiceWorkerRegistrationNotifications.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/ExecutionContext.h" 10 #include "core/dom/ExecutionContext.h"
(...skipping 23 matching lines...) Expand all
34 class NotificationArray { 34 class NotificationArray {
35 public: 35 public:
36 using WebType = const WebVector<WebPersistentNotificationInfo>&; 36 using WebType = const WebVector<WebPersistentNotificationInfo>&;
37 37
38 static HeapVector<Member<Notification>> take( 38 static HeapVector<Member<Notification>> take(
39 ScriptPromiseResolver* resolver, 39 ScriptPromiseResolver* resolver,
40 const WebVector<WebPersistentNotificationInfo>& notificationInfos) { 40 const WebVector<WebPersistentNotificationInfo>& notificationInfos) {
41 HeapVector<Member<Notification>> notifications; 41 HeapVector<Member<Notification>> notifications;
42 for (const WebPersistentNotificationInfo& notificationInfo : 42 for (const WebPersistentNotificationInfo& notificationInfo :
43 notificationInfos) 43 notificationInfos)
44 notifications.append(Notification::create( 44 notifications.push_back(Notification::create(
45 resolver->getExecutionContext(), notificationInfo.notificationId, 45 resolver->getExecutionContext(), notificationInfo.notificationId,
46 notificationInfo.data, true /* showing */)); 46 notificationInfo.data, true /* showing */));
47 47
48 return notifications; 48 return notifications;
49 } 49 }
50 50
51 private: 51 private:
52 NotificationArray() = delete; 52 NotificationArray() = delete;
53 }; 53 };
54 54
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 Platform::current()->notificationManager(); 190 Platform::current()->notificationManager();
191 DCHECK(notificationManager); 191 DCHECK(notificationManager);
192 192
193 notificationManager->showPersistent( 193 notificationManager->showPersistent(
194 WebSecurityOrigin(origin.get()), data, loader->getResources(), 194 WebSecurityOrigin(origin.get()), data, loader->getResources(),
195 m_registration->webRegistration(), std::move(callbacks)); 195 m_registration->webRegistration(), std::move(callbacks));
196 m_loaders.remove(loader); 196 m_loaders.remove(loader);
197 } 197 }
198 198
199 } // namespace blink 199 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698