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

Unified Diff: chrome/browser/ui/webui/plugins_ui.cc

Issue 10095029: Disable "always allowed" checkbox in chrome://plugins for disabled plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 8 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
« no previous file with comments | « chrome/browser/resources/plugins.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/plugins_ui.cc
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index cc4b69cfdc6a518ed4e162a43bb69da4f4e3b06e..0db6adf0a64467280f3f008178c2b03c32560cb6 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -342,7 +342,6 @@ void PluginsDOMHandler::PluginsLoaded(PluginFinder* plugin_finder,
Profile* profile = Profile::FromWebUI(web_ui());
PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
- HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
ContentSettingsPattern wildcard = ContentSettingsPattern::Wildcard();
// Construct DictionaryValues to return to the UI
@@ -448,19 +447,11 @@ void PluginsDOMHandler::PluginsLoaded(PluginFinder* plugin_finder,
}
group_data->SetString("enabledMode", enabled_mode);
- // TODO(bauerb): We should have a method on HostContentSettingsMap for this.
bool always_allowed = false;
- ContentSettingsForOneType settings;
- map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_PLUGINS,
- group.identifier(), &settings);
- for (ContentSettingsForOneType::const_iterator it = settings.begin();
- it != settings.end(); ++it) {
- if (it->primary_pattern == wildcard &&
- it->secondary_pattern == wildcard &&
- it->setting == CONTENT_SETTING_ALLOW) {
- always_allowed = true;
- break;
- }
+ if (group_enabled) {
+ const DictionaryValue* whitelist = profile->GetPrefs()->GetDictionary(
+ prefs::kContentSettingsPluginWhitelist);
+ whitelist->GetBoolean(group.identifier(), &always_allowed);
}
group_data->SetBoolean("alwaysAllowed", always_allowed);
« no previous file with comments | « chrome/browser/resources/plugins.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698