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

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

Issue 758603002: Use Mojo Permission Service when requesting Notifications permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_geolocation_follow_up
Patch Set: Created 6 years, 1 month 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_dispatcher.cc
diff --git a/content/child/notifications/notification_dispatcher.cc b/content/child/notifications/notification_dispatcher.cc
index 9401903333dda9ce8d2c45aea5e9bf05e2c81ca6..25d6f42dd69352ba9f716354fab608c0ede7c594 100644
--- a/content/child/notifications/notification_dispatcher.cc
+++ b/content/child/notifications/notification_dispatcher.cc
@@ -29,9 +29,6 @@ int NotificationDispatcher::GenerateNotificationId(int thread_id) {
base::TaskRunner* NotificationDispatcher::OverrideTaskRunnerForMessage(
const IPC::Message& msg) {
- if (!ShouldHandleMessage(msg))
- return NULL;
-
int notification_id = -1,
thread_id = 0;
@@ -52,9 +49,6 @@ base::TaskRunner* NotificationDispatcher::OverrideTaskRunnerForMessage(
}
bool NotificationDispatcher::OnMessageReceived(const IPC::Message& msg) {
- if (!ShouldHandleMessage(msg))
- return false;
-
NotificationManager::ThreadSpecificInstance(
thread_safe_sender_.get(),
main_thread_loop_proxy_.get(),
@@ -62,12 +56,4 @@ bool NotificationDispatcher::OnMessageReceived(const IPC::Message& msg) {
return true;
}
-bool NotificationDispatcher::ShouldHandleMessage(const IPC::Message& msg) {
- // The thread-safe message filter is responsible for handling all the messages
- // except for the routed permission-request-completed message, which will be
- // picked up by the RenderFrameImpl instead.
- return IPC_MESSAGE_CLASS(msg) == PlatformNotificationMsgStart &&
- msg.type() != PlatformNotificationMsg_PermissionRequestComplete::ID;
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698