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

Unified Diff: chrome/browser/notifications/notification_permission_infobar_delegate.cc

Issue 2490493002: Pass the permission type to NotificationPermissionInfoBarDelegate (Closed)
Patch Set: Pass the permission type to NotificationPermissionInfoBarDelegate Created 4 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: chrome/browser/notifications/notification_permission_infobar_delegate.cc
diff --git a/chrome/browser/notifications/notification_permission_infobar_delegate.cc b/chrome/browser/notifications/notification_permission_infobar_delegate.cc
index af37e87ea23cf620411babb1baee3b0de85d5199..139259926b91ef7c90527a12104429b5a77d1202 100644
--- a/chrome/browser/notifications/notification_permission_infobar_delegate.cc
+++ b/chrome/browser/notifications/notification_permission_infobar_delegate.cc
@@ -8,16 +8,20 @@
#include "chrome/grit/generated_resources.h"
NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate(
+ const content::PermissionType& permission_type,
const GURL& requesting_frame,
bool user_gesture,
Profile* profile,
const PermissionSetCallback& callback)
: PermissionInfoBarDelegate(requesting_frame,
- content::PermissionType::NOTIFICATIONS,
+ permission_type,
CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
user_gesture,
profile,
- callback) {}
+ callback) {
+ DCHECK(permission_type == content::PermissionType::NOTIFICATIONS ||
+ permission_type == content::PermissionType::PUSH_MESSAGING);
+}
NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate()
{}

Powered by Google App Engine
This is Rietveld 408576698