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

Unified Diff: chrome/browser/renderer_host/plugin_info_message_filter.cc

Issue 10125007: Don't infobar plug-ins when they're whitelisted via chrome://plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/plugin_info_message_filter.cc
diff --git a/chrome/browser/renderer_host/plugin_info_message_filter.cc b/chrome/browser/renderer_host/plugin_info_message_filter.cc
index 13bc7d68514a4c82643f31071ec884978e7187e8..379941c4f40e4356caa2d07a63d50bb5b9499638 100644
--- a/chrome/browser/renderer_host/plugin_info_message_filter.cc
+++ b/chrome/browser/renderer_host/plugin_info_message_filter.cc
@@ -250,6 +250,7 @@ void PluginInfoMessageFilter::Context::GetPluginContentSetting(
scoped_ptr<base::Value> value;
content_settings::SettingInfo info;
+ bool uses_plugin_specific_setting = false;
if (is_nacl_plugin) {
value.reset(
host_content_settings_map_->GetWebsiteSetting(
@@ -260,7 +261,9 @@ void PluginInfoMessageFilter::Context::GetPluginContentSetting(
host_content_settings_map_->GetWebsiteSetting(
policy_url, plugin_url, CONTENT_SETTINGS_TYPE_PLUGINS, resource,
&info));
- if (!value.get()) {
+ if (value.get()) {
+ uses_plugin_specific_setting = true;
+ } else {
value.reset(host_content_settings_map_->GetWebsiteSetting(
policy_url, plugin_url, CONTENT_SETTINGS_TYPE_PLUGINS, std::string(),
&info));
@@ -268,6 +271,7 @@ void PluginInfoMessageFilter::Context::GetPluginContentSetting(
}
*setting = content_settings::ValueToContentSetting(value.get());
*uses_default_content_setting =
- (info.primary_pattern == ContentSettingsPattern::Wildcard() &&
- info.secondary_pattern == ContentSettingsPattern::Wildcard());
+ !uses_plugin_specific_setting &&
+ info.primary_pattern == ContentSettingsPattern::Wildcard() &&
+ info.secondary_pattern == ContentSettingsPattern::Wildcard();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698