Chromium Code Reviews| Index: chrome/browser/notifications/platform_notification_service_impl.cc |
| diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc |
| index 6e52f15d3fe004fd3b5686a9912fdd98a6779c5d..e51070cccb1f4d039ae1f7a7b9c829f4c3af1e8c 100644 |
| --- a/chrome/browser/notifications/platform_notification_service_impl.cc |
| +++ b/chrome/browser/notifications/platform_notification_service_impl.cc |
| @@ -288,8 +288,9 @@ void PlatformNotificationServiceImpl::DisplayNotification( |
| NotificationObjectProxy* proxy = |
| new NotificationObjectProxy(browser_context, std::move(delegate)); |
| - Notification notification = CreateNotificationFromData( |
| - profile, origin, notification_data, notification_resources, proxy); |
| + Notification notification = |
| + CreateNotificationFromData(profile, GURL(), origin, notification_data, |
|
Peter Beverloo
2016/07/15 13:40:11
nit: GURL() -> GURL() /* service_worker_scope */
|
| + notification_resources, proxy); |
| GetNotificationDisplayService(profile)->Display( |
| NotificationCommon::NON_PERSISTENT, notification.delegate_id(), |
| @@ -313,6 +314,7 @@ void PlatformNotificationServiceImpl::DisplayNotification( |
| void PlatformNotificationServiceImpl::DisplayPersistentNotification( |
| BrowserContext* browser_context, |
| int64_t persistent_notification_id, |
| + const GURL& service_worker_scope, |
| const GURL& origin, |
| const content::PlatformNotificationData& notification_data, |
| const content::NotificationResources& notification_resources) { |
| @@ -329,7 +331,8 @@ void PlatformNotificationServiceImpl::DisplayPersistentNotification( |
| settings_button_index); |
| Notification notification = CreateNotificationFromData( |
| - profile, origin, notification_data, notification_resources, delegate); |
| + profile, service_worker_scope, origin, notification_data, |
| + notification_resources, delegate); |
| // TODO(peter): Remove this mapping when we have reliable id generation for |
| // the message_center::Notification objects. |
| @@ -418,6 +421,7 @@ void PlatformNotificationServiceImpl::OnCloseEventDispatchComplete( |
| Notification PlatformNotificationServiceImpl::CreateNotificationFromData( |
| Profile* profile, |
| + const GURL& scope, |
|
Peter Beverloo
2016/07/15 13:40:11
general nit: naming for this value is all over the
|
| const GURL& origin, |
| const content::PlatformNotificationData& notification_data, |
| const content::NotificationResources& notification_resources, |
| @@ -435,6 +439,7 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData( |
| origin, notification_data.tag, message_center::RichNotificationData(), |
| delegate); |
| + notification.set_scope_url(scope); |
| notification.set_context_message( |
| DisplayNameForContextMessage(profile, origin)); |
| notification.set_vibration_pattern(notification_data.vibration_pattern); |