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

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

Issue 319553008: Updated Plugin bubble model to add "learn more" link and to appear with a sliding yellow thing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated so that the yellow thing occurs only when the content setting is set to allow Created 6 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/ui/content_settings/content_setting_image_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc
index 9e564a29c0227bf468b79aa4fef7a724a34a6081..5d0cc1a2d0eb5a63c54dc308948537647d244c38 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -112,8 +112,9 @@ void ContentSettingBlockedImageModel::UpdateFromWebContents(
};
static const ContentSettingsTypeIdEntry kBlockedExplanatoryTextIDs[] = {
{CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT},
+ {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGIN_EXPLANATORY_TEXT},
{CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
- IDS_BLOCKED_DOWNLOADS_EXPLANATION},
+ IDS_BLOCKED_DOWNLOADS_EXPLANATION},
};
ContentSettingsType type = get_content_settings_type();
@@ -132,6 +133,13 @@ void ContentSettingBlockedImageModel::UpdateFromWebContents(
return;
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ if (get_content_settings_type() == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ (profile->GetHostContentSettingsMap()->
+ GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS, NULL) !=
+ CONTENT_SETTING_ALLOW))
+ explanation_id = 0;
+
+
if (!content_settings->IsContentBlocked(get_content_settings_type())) {
if (!content_settings->IsContentAllowed(get_content_settings_type()))
return;

Powered by Google App Engine
This is Rietveld 408576698