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

Unified Diff: chrome/browser/content_settings/permission_bubble_request_impl.cc

Issue 376253005: Migrate the notification permission to the new common permission classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/content_settings/permission_bubble_request_impl.cc
diff --git a/chrome/browser/content_settings/permission_bubble_request_impl.cc b/chrome/browser/content_settings/permission_bubble_request_impl.cc
index b7341db6185730c6356737728f64caf66c4189cd..58182d91466060f1bebace7f6a71d112f0274df7 100644
--- a/chrome/browser/content_settings/permission_bubble_request_impl.cc
+++ b/chrome/browser/content_settings/permission_bubble_request_impl.cc
@@ -37,6 +37,11 @@ PermissionBubbleRequestImpl::~PermissionBubbleRequestImpl() {
int PermissionBubbleRequestImpl::GetIconID() const {
int icon_id;
switch (type_) {
+#if defined(ENABLE_NOTIFICATIONS)
+ case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
+ icon_id = IDR_INFOBAR_DESKTOP_NOTIFICATIONS;
+ break;
+#endif // ENABLE_NOTIFICATIONS
Peter Beverloo 2014/07/18 10:42:38 nit: don't need the comment after the #endif if th
Miguel Garcia 2014/07/18 12:27:08 Done.
case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
icon_id = IDR_ALLOWED_MIDI_SYSEX;
break;
@@ -53,6 +58,11 @@ int PermissionBubbleRequestImpl::GetIconID() const {
base::string16 PermissionBubbleRequestImpl::GetMessageText() const {
int message_id;
switch (type_) {
+#if defined(ENABLE_NOTIFICATIONS)
+ case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
+ message_id = IDS_NOTIFICATION_PERMISSIONS;
+ break;
+#endif // ENABLE_NOTIFICATIONS
case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
message_id = IDS_MIDI_SYSEX_INFOBAR_QUESTION;
break;
@@ -74,6 +84,11 @@ base::string16 PermissionBubbleRequestImpl::GetMessageText() const {
base::string16 PermissionBubbleRequestImpl::GetMessageTextFragment() const {
int message_id;
switch (type_) {
+#if defined(ENABLE_NOTIFICATIONS)
+ case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
+ message_id = IDS_NOTIFICATION_PERMISSIONS_FRAGMENT;
+ break;
+#endif // ENABLE_NOTIFICATIONS
case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
message_id = IDS_MIDI_SYSEX_PERMISSION_FRAGMENT;
break;

Powered by Google App Engine
This is Rietveld 408576698