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

Side by Side Diff: chrome/browser/notifications/notification_permission_infobar_delegate.cc

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/notification_permission_infobar_delegate. h" 5 #include "chrome/browser/notifications/notification_permission_infobar_delegate. h"
6 6
7 #include "chrome/browser/android/android_theme_resources.h" 7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
9 9
10 NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate( 10 NotificationPermissionInfoBarDelegate::NotificationPermissionInfoBarDelegate(
11 const content::PermissionType& permission_type, 11 ContentSettingsType type,
12 const GURL& requesting_frame, 12 const GURL& requesting_frame,
13 bool user_gesture, 13 bool user_gesture,
14 Profile* profile, 14 Profile* profile,
15 const PermissionSetCallback& callback) 15 const PermissionSetCallback& callback)
16 : PermissionInfoBarDelegate(requesting_frame, 16 : PermissionInfoBarDelegate(requesting_frame,
17 permission_type, 17 type,
18 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
19 user_gesture, 18 user_gesture,
20 profile, 19 profile,
21 callback) { 20 callback) {
22 DCHECK(permission_type == content::PermissionType::NOTIFICATIONS || 21 DCHECK(type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS ||
23 permission_type == content::PermissionType::PUSH_MESSAGING); 22 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING);
24 } 23 }
25 24
26 NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate() 25 NotificationPermissionInfoBarDelegate::~NotificationPermissionInfoBarDelegate()
27 {} 26 {}
28 27
29 infobars::InfoBarDelegate::InfoBarIdentifier 28 infobars::InfoBarDelegate::InfoBarIdentifier
30 NotificationPermissionInfoBarDelegate::GetIdentifier() const { 29 NotificationPermissionInfoBarDelegate::GetIdentifier() const {
31 return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE; 30 return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE;
32 } 31 }
33 32
34 int NotificationPermissionInfoBarDelegate::GetIconId() const { 33 int NotificationPermissionInfoBarDelegate::GetIconId() const {
35 return IDR_ANDROID_INFOBAR_NOTIFICATIONS; 34 return IDR_ANDROID_INFOBAR_NOTIFICATIONS;
36 } 35 }
37 36
38 int NotificationPermissionInfoBarDelegate::GetMessageResourceId() const { 37 int NotificationPermissionInfoBarDelegate::GetMessageResourceId() const {
39 return IDS_NOTIFICATION_PERMISSIONS; 38 return IDS_NOTIFICATION_PERMISSIONS;
40 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698