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

Unified Diff: chrome/browser/content_setting_bubble_model.cc

Issue 2815042: Add notifications content settings type. (Closed)
Patch Set: '' Created 10 years, 6 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_setting_bubble_model.cc
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc
index d4735dc6c1bfa2b21a84c4216068431d231fc81f..d918c35b2ade6f920d5739d7c4d9f56c7017f4e9 100644
--- a/chrome/browser/content_setting_bubble_model.cc
+++ b/chrome/browser/content_setting_bubble_model.cc
@@ -22,6 +22,8 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
ContentSettingTitleAndLinkModel(TabContents* tab_contents, Profile* profile,
ContentSettingsType content_type)
: ContentSettingBubbleModel(tab_contents, profile, content_type) {
+ // Notifications do not have a bubble.
+ DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
SetTitle();
SetManageLink();
}
@@ -35,6 +37,7 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
IDS_BLOCKED_PLUGINS_TITLE,
IDS_BLOCKED_POPUPS_TITLE,
0, // Geolocation does not have an overall title.
+ 0, // Notifications do not have a bubble.
};
COMPILE_ASSERT(arraysize(kTitleIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
@@ -50,6 +53,7 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
IDS_BLOCKED_PLUGINS_LINK,
IDS_BLOCKED_POPUPS_LINK,
IDS_GEOLOCATION_BUBBLE_MANAGE_LINK,
+ 0, // Notifications do not have a bubble.
};
COMPILE_ASSERT(arraysize(kLinkIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
@@ -89,6 +93,7 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
IDS_BLOCKED_PLUGINS_UNBLOCK,
IDS_BLOCKED_POPUPS_UNBLOCK,
0, // We don't manage geolocation here.
+ 0, // Notifications do not have a bubble.
};
COMPILE_ASSERT(arraysize(kAllowIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
@@ -103,6 +108,7 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
IDS_BLOCKED_PLUGINS_NO_ACTION,
IDS_BLOCKED_POPUPS_NO_ACTION,
0, // We don't manage geolocation here.
+ 0, // Notifications do not have a bubble.
};
COMPILE_ASSERT(arraysize(kBlockIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
« no previous file with comments | « chrome/browser/cocoa/content_blocked_bubble_controller.mm ('k') | chrome/browser/content_setting_image_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698