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

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

Issue 2250053002: Clean up the PermissionInfoBarDelegate hierarchy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-infobar-remember-decision
Patch Set: Created 4 years, 4 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/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 2ab8c83c0e4d93f196d0b64364064782c9f25d67..d384a7fd605b932351a358620e09de7c928d9b39 100644
--- a/chrome/browser/notifications/notification_permission_infobar_delegate.cc
+++ b/chrome/browser/notifications/notification_permission_infobar_delegate.cc
@@ -10,43 +10,42 @@
#include "components/infobars/core/infobar.h"
// static
-infobars::InfoBar* NotificationPermissionInfobarDelegate::Create(
+infobars::InfoBar* NotificationPermissionInfoBarDelegate::Create(
InfoBarService* infobar_service,
const GURL& requesting_frame,
bool user_gesture,
Profile* profile,
const PermissionSetCallback& callback) {
return infobar_service->AddInfoBar(
- CreatePermissionInfoBar(std::unique_ptr<PermissionInfobarDelegate>(
- new NotificationPermissionInfobarDelegate(
+ CreatePermissionInfoBar(std::unique_ptr<PermissionInfoBarDelegate>(
+ new NotificationPermissionInfoBarDelegate(
requesting_frame, user_gesture, profile, callback))));
}
-NotificationPermissionInfobarDelegate::NotificationPermissionInfobarDelegate(
+NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate(
const GURL& requesting_frame,
bool user_gesture,
Profile* profile,
const PermissionSetCallback& callback)
- : PermissionInfobarDelegate(requesting_frame,
- content::PermissionType::NOTIFICATIONS,
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
- user_gesture,
- profile,
- callback),
- requesting_frame_(requesting_frame) {}
-
-NotificationPermissionInfobarDelegate::~NotificationPermissionInfobarDelegate()
+ : SinglePermissionInfoBarDelegate(requesting_frame,
+ content::PermissionType::NOTIFICATIONS,
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ user_gesture,
+ profile,
+ callback) {}
+
+NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate()
{}
infobars::InfoBarDelegate::InfoBarIdentifier
-NotificationPermissionInfobarDelegate::GetIdentifier() const {
+NotificationPermissionInfoBarDelegate::GetIdentifier() const {
return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE;
}
-int NotificationPermissionInfobarDelegate::GetIconId() const {
+int NotificationPermissionInfoBarDelegate::GetIconId() const {
return IDR_ANDROID_INFOBAR_NOTIFICATIONS;
}
-int NotificationPermissionInfobarDelegate::GetMessageResourceId() const {
+int NotificationPermissionInfoBarDelegate::GetMessageResourceId() const {
return IDS_NOTIFICATION_PERMISSIONS;
}

Powered by Google App Engine
This is Rietveld 408576698