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

Unified Diff: chrome/browser/push_messaging/push_messaging_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: chrome/browser/push_messaging/push_messaging_notification_manager.cc
diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager.cc b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
index e80db64effe85f8adc5f90611d4f98bd21dda374..da6fbda89e28452d7a7f5d3cc605a7ae59aef98e 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -351,9 +351,13 @@ void PushMessagingNotificationManager::DidWriteNotificationData(
return;
}
+ // Do not pass service worker scope. The origin will be used instead of the
+ // service worker scope to determine whether a notification should be
+ // attributed to a WebAPK on Android. This is OK because this code path is hit
+ // rarely.
PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification(
- profile_, persistent_notification_id, origin, notification_data,
- NotificationResources());
+ profile_, persistent_notification_id, GURL() /* service_worker_scope */,
+ origin, notification_data, NotificationResources());
message_handled_closure.Run();
}

Powered by Google App Engine
This is Rietveld 408576698