Chromium Code Reviews| 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..a3d6e50cf74f9a3f57915a012453f75b58931f5c 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,27 @@ 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) { |
| + if (content_settings->IsContentBlocked(content_type())) { |
| + const base::string16 plugin_names = |
| + content_settings->GetBlockedPluginNames(); |
| + if (!plugin_names.empty()) { |
|
Bernhard Bauer
2014/12/08 09:21:44
If |plugin_names| is indeed empty, you will call s
Will Harris
2014/12/08 21:11:46
Done.
|
| + set_plugin_names(plugin_names); |
| + } |
| + } |
| + } |
| + |
| 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 +144,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); |
| } |