| 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 2479e88e9ce6fa0fe20e0cceb36116b77a682100..0845d552924343d560b820c48120ac1f5af0aeb9 100644
|
| --- a/chrome/browser/notifications/notification_permission_infobar_delegate.cc
|
| +++ b/chrome/browser/notifications/notification_permission_infobar_delegate.cc
|
| @@ -15,9 +15,9 @@ infobars::InfoBar* NotificationPermissionInfobarDelegate::Create(
|
| const GURL& requesting_frame,
|
| bool user_gesture,
|
| Profile* profile,
|
| - const base::Callback<void(bool, bool)>& callback) {
|
| - return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
|
| - std::unique_ptr<ConfirmInfoBarDelegate>(
|
| + const PermissionSetCallback& callback) {
|
| + return infobar_service->AddInfoBar(
|
| + CreatePermissionInfoBar(std::unique_ptr<PermissionInfobarDelegate>(
|
| new NotificationPermissionInfobarDelegate(
|
| requesting_frame, user_gesture, profile, callback))));
|
| }
|
| @@ -26,7 +26,7 @@ NotificationPermissionInfobarDelegate::NotificationPermissionInfobarDelegate(
|
| const GURL& requesting_frame,
|
| bool user_gesture,
|
| Profile* profile,
|
| - const base::Callback<void(bool, bool)>& callback)
|
| + const PermissionSetCallback& callback)
|
| : PermissionInfobarDelegate(requesting_frame,
|
| content::PermissionType::NOTIFICATIONS,
|
| CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
|
| @@ -38,6 +38,13 @@ NotificationPermissionInfobarDelegate::NotificationPermissionInfobarDelegate(
|
| NotificationPermissionInfobarDelegate::~NotificationPermissionInfobarDelegate()
|
| {}
|
|
|
| +// Do not allow the persistence toggle to be shown for this infobar, as it does
|
| +// not make sense for notification permission to not be persisted.
|
| +bool NotificationPermissionInfobarDelegate::ShouldShowPersistenceToggle()
|
| + const {
|
| + return false;
|
| +}
|
| +
|
| infobars::InfoBarDelegate::InfoBarIdentifier
|
| NotificationPermissionInfobarDelegate::GetIdentifier() const {
|
| return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE;
|
|
|