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

Side by Side Diff: content/child/notifications/notification_manager.cc

Issue 985693004: Remove the old signature of NotificationManager::closePersistent(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-close-data
Patch Set: rebase Created 5 years, 9 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
« no previous file with comments | « content/child/notifications/notification_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/child/notifications/notification_manager.h" 5 #include "content/child/notifications/notification_manager.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 void NotificationManager::closePersistent( 136 void NotificationManager::closePersistent(
137 const blink::WebSerializedOrigin& origin, 137 const blink::WebSerializedOrigin& origin,
138 const blink::WebString& persistent_notification_id) { 138 const blink::WebString& persistent_notification_id) {
139 thread_safe_sender_->Send(new PlatformNotificationHostMsg_ClosePersistent( 139 thread_safe_sender_->Send(new PlatformNotificationHostMsg_ClosePersistent(
140 GURL(origin.string()), 140 GURL(origin.string()),
141 base::UTF16ToUTF8(persistent_notification_id))); 141 base::UTF16ToUTF8(persistent_notification_id)));
142 } 142 }
143 143
144 void NotificationManager::closePersistent(
145 const blink::WebString& persistent_notification_id) {
146 closePersistent(blink::WebSerializedOrigin(), persistent_notification_id);
147 }
148
149 void NotificationManager::notifyDelegateDestroyed( 144 void NotificationManager::notifyDelegateDestroyed(
150 blink::WebNotificationDelegate* delegate) { 145 blink::WebNotificationDelegate* delegate) {
151 if (pending_notifications_.CancelPageNotificationFetches(delegate)) 146 if (pending_notifications_.CancelPageNotificationFetches(delegate))
152 return; 147 return;
153 148
154 for (auto& iter : active_page_notifications_) { 149 for (auto& iter : active_page_notifications_) {
155 if (iter.second != delegate) 150 if (iter.second != delegate)
156 continue; 151 continue;
157 152
158 active_page_notifications_.erase(iter.first); 153 active_page_notifications_.erase(iter.first);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 GURL(origin.string()), 231 GURL(origin.string()),
237 icon, 232 icon,
238 ToPlatformNotificationData(notification_data))); 233 ToPlatformNotificationData(notification_data)));
239 234
240 // There currently isn't a case in which the promise would be rejected per 235 // There currently isn't a case in which the promise would be rejected per
241 // our implementation, so always resolve it here. 236 // our implementation, so always resolve it here.
242 callbacks->onSuccess(); 237 callbacks->onSuccess();
243 } 238 }
244 239
245 } // namespace content 240 } // namespace content
OLDNEW
« no previous file with comments | « content/child/notifications/notification_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698