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

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

Issue 1943963004: Revert of (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "content/child/notifications/notification_manager.h" 5 #include "content/child/notifications/notification_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 blink::WebNotificationDelegate* delegate) { 202 blink::WebNotificationDelegate* delegate) {
203 for (auto& iter : active_page_notifications_) { 203 for (auto& iter : active_page_notifications_) {
204 if (iter.second != delegate) 204 if (iter.second != delegate)
205 continue; 205 continue;
206 206
207 active_page_notifications_.erase(iter.first); 207 active_page_notifications_.erase(iter.first);
208 return; 208 return;
209 } 209 }
210 } 210 }
211 211
212 permissions::mojom::PermissionStatus NotificationManager::checkPermission( 212 blink::mojom::PermissionStatus NotificationManager::checkPermission(
213 const blink::WebSecurityOrigin& origin) { 213 const blink::WebSecurityOrigin& origin) {
214 permissions::mojom::PermissionStatus permission_status = 214 blink::mojom::PermissionStatus permission_status =
215 permissions::mojom::PermissionStatus::DENIED; 215 blink::mojom::PermissionStatus::DENIED;
216 216
217 // TODO(mkwst): This is potentially doing the wrong thing with unique 217 // TODO(mkwst): This is potentially doing the wrong thing with unique
218 // origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See 218 // origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See
219 // https://crbug.com/490074 for detail. 219 // https://crbug.com/490074 for detail.
220 thread_safe_sender_->Send(new PlatformNotificationHostMsg_CheckPermission( 220 thread_safe_sender_->Send(new PlatformNotificationHostMsg_CheckPermission(
221 blink::WebStringToGURL(origin.toString()), &permission_status)); 221 blink::WebStringToGURL(origin.toString()), &permission_status));
222 222
223 return permission_status; 223 return permission_status;
224 } 224 }
225 225
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 notifications[i] = web_notification_info; 301 notifications[i] = web_notification_info;
302 } 302 }
303 303
304 callbacks->onSuccess(notifications); 304 callbacks->onSuccess(notifications);
305 305
306 pending_get_notification_requests_.Remove(request_id); 306 pending_get_notification_requests_.Remove(request_id);
307 } 307 }
308 308
309 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « content/child/notifications/notification_manager.h ('k') | content/child/permissions/permission_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698