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

Unified Diff: content/browser/notifications/notification_message_filter.cc

Issue 1995663003: Revert of Introduce the Blink NotificationService, move permission checks there (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 side-by-side diff with in-line comments
Download patch
Index: content/browser/notifications/notification_message_filter.cc
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc
index d522e75f7d54a3c98f5fc561aad7f0828ab5368a..876a89c11e185cb0371b6a4d74294b913f108b19 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -95,6 +95,8 @@
bool NotificationMessageFilter::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NotificationMessageFilter, message)
+ IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_CheckPermission,
+ OnCheckNotificationPermission)
IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_Show,
OnShowPlatformNotification)
IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_ShowPersistent,
@@ -119,6 +121,14 @@
*thread = BrowserThread::UI;
}
+void NotificationMessageFilter::OnCheckNotificationPermission(
+ const GURL& origin,
+ blink::mojom::PermissionStatus* permission_status) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ *permission_status = GetPermissionForOriginOnIO(origin);
+}
+
void NotificationMessageFilter::OnShowPlatformNotification(
int notification_id,
const GURL& origin,

Powered by Google App Engine
This is Rietveld 408576698