Chromium Code Reviews| Index: chrome/browser/notifications/desktop_notification_service.cc |
| diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc |
| index eb6d72f6b7a30377eba03195accebb1370a8bd0e..67f5a7d33c46ab9e500fda8d0543397838fc35db 100644 |
| --- a/chrome/browser/notifications/desktop_notification_service.cc |
| +++ b/chrome/browser/notifications/desktop_notification_service.cc |
| @@ -313,6 +313,21 @@ void DesktopNotificationService::OnExtensionUninstalled( |
| #endif |
| } |
| +// Unlike other permission types, granting a notification for a given origin |
| +// will grant it even if it is embedded as an iframe in other domains. |
|
Peter Beverloo
2014/09/23 15:58:47
This is phrased a bit ambiguously, what about the
Bernhard Bauer
2014/09/23 16:13:02
I would point out in the comment that the embeddin
Miguel Garcia
2014/09/23 16:53:38
Acknowledged.
Miguel Garcia
2014/09/23 16:53:39
Done.
|
| +void DesktopNotificationService::UpdateContentSetting( |
| + const GURL& requesting_origin, |
| + const GURL& embedder_origin, |
| + bool allowed) { |
| + if (allowed) |
|
Bernhard Bauer
2014/09/23 16:13:02
Braces can only be omitted for single-line bodies.
Miguel Garcia
2014/09/23 16:53:39
Done.
|
| + DesktopNotificationProfileUtil::GrantPermission( |
| + profile_, requesting_origin); |
| + else |
| + DesktopNotificationProfileUtil::DenyPermission(profile_, requesting_origin); |
| +} |
| + |
|
Peter Beverloo
2014/09/23 15:58:47
nit: only a single blank line.
Miguel Garcia
2014/09/23 16:53:39
Done.
|
| + |
| + |
| void DesktopNotificationService::OnNotificationPermissionRequested( |
| const NotificationPermissionCallback& callback, bool allowed) { |
| blink::WebNotificationPermission permission = allowed ? |