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

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

Issue 1145013004: Introduce bad_message.h for chrome and NaCl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove newline Created 5 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 9b9d38139e7bd3937a5ad3d94476ce3a223cdaa6..8f22f429515aa8c3fca0dc42b9fcdab6b63b5808 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -5,6 +5,7 @@
#include "content/browser/notifications/notification_message_filter.h"
#include "base/callback.h"
+#include "content/browser/bad_message.h"
#include "content/browser/notifications/page_notification_delegate.h"
#include "content/browser/notifications/platform_notification_context_impl.h"
#include "content/common/platform_notification_messages.h"
@@ -138,7 +139,7 @@ void NotificationMessageFilter::OnShowPersistentNotification(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (GetPermissionForOriginOnIO(origin) !=
blink::WebNotificationPermissionAllowed) {
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this, bad_message::NMF_NO_PERMISSION_SHOW);
return;
}
@@ -257,7 +258,7 @@ void NotificationMessageFilter::OnClosePersistentNotification(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (GetPermissionForOriginOnIO(origin) !=
blink::WebNotificationPermissionAllowed) {
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this, bad_message::NMF_NO_PERMISSION_CLOSE);
return;
}
@@ -318,7 +319,7 @@ bool NotificationMessageFilter::VerifyNotificationPermissionGranted(
if (permission == blink::WebNotificationPermissionAllowed)
return true;
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this, bad_message::NMF_NO_PERMISSION_VERIFY);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698