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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 777103002: Add the names of plugins to the blocked plugin bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use group_name instead of plugin.name Created 6 years 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/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 1e3433a5ca01d000f1854756f0ec8aa07225a17a..d8e668ac5dd1a550a9d01e708a02e42170ca93e6 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -108,11 +108,22 @@ ContentSettingTitleAndLinkModel::ContentSettingTitleAndLinkModel(
}
void ContentSettingTitleAndLinkModel::SetTitle() {
+ TabSpecificContentSettings* content_settings = NULL;
+ if (web_contents()) {
+ content_settings =
+ TabSpecificContentSettings::FromWebContents(web_contents());
+ }
+
+ if (content_type() == CONTENT_SETTINGS_TYPE_PLUGINS && content_settings &&
+ content_settings->IsContentBlocked(content_type())) {
+ set_plugin_names(content_settings->GetBlockedPluginNames());
+ }
+
static const ContentSettingsTypeIdEntry kBlockedTitleIDs[] = {
{CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_TITLE},
{CONTENT_SETTINGS_TYPE_IMAGES, IDS_BLOCKED_IMAGES_TITLE},
{CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_TITLE},
- {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_MESSAGE},
+ {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_TITLE},
{CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_TITLE},
{CONTENT_SETTINGS_TYPE_MIXEDSCRIPT,
IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT},
@@ -128,11 +139,8 @@ void ContentSettingTitleAndLinkModel::SetTitle() {
};
const ContentSettingsTypeIdEntry *title_ids = kBlockedTitleIDs;
size_t num_title_ids = arraysize(kBlockedTitleIDs);
- if (web_contents() &&
- TabSpecificContentSettings::FromWebContents(
- web_contents())->IsContentAllowed(content_type()) &&
- !TabSpecificContentSettings::FromWebContents(
- web_contents())->IsContentBlocked(content_type())) {
+ if (content_settings && content_settings->IsContentAllowed(content_type()) &&
+ !content_settings->IsContentBlocked(content_type())) {
title_ids = kAccessedTitleIDs;
num_title_ids = arraysize(kAccessedTitleIDs);
}

Powered by Google App Engine
This is Rietveld 408576698