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

Unified Diff: content/child/notifications/notification_manager.cc

Issue 2151993002: [WebAPKs] Plumb service worker scope to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into notification_scope Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/child/notifications/notification_manager.cc
diff --git a/content/child/notifications/notification_manager.cc b/content/child/notifications/notification_manager.cc
index ed5642482ca84a12b9d2d30dcc8baf9c40a8540d..5d5fb61b8e209a69e00f7f673adad74fe65e948f 100644
--- a/content/child/notifications/notification_manager.cc
+++ b/content/child/notifications/notification_manager.cc
@@ -138,11 +138,16 @@ void NotificationManager::showPersistent(
// TODO(mkwst): This is potentially doing the wrong thing with unique
// origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See
// https://crbug.com/490074 for detail.
- thread_safe_sender_->Send(new PlatformNotificationHostMsg_ShowPersistent(
- request_id, service_worker_registration_id,
- blink::WebStringToGURL(origin.toString()),
- ToPlatformNotificationData(notification_data),
- ToNotificationResources(std::move(notification_resources))));
+ PlatformNotificationHostMsg_ShowPersistent_Params params;
+ params.request_id = request_id;
+ params.service_worker_registration_id = service_worker_registration_id;
+ params.service_worker_scope = service_worker_registration->scope();
+ params.origin = blink::WebStringToGURL(origin.toString());
+ params.notification_data = ToPlatformNotificationData(notification_data);
+ params.notification_resources =
+ ToNotificationResources(std::move(notification_resources));
+ thread_safe_sender_->Send(
+ new PlatformNotificationHostMsg_ShowPersistent(params));
}
void NotificationManager::getNotifications(

Powered by Google App Engine
This is Rietveld 408576698