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 882eca24316cda6f9b0292c8749dd06052ab883a..68d4a4b3ad0297ef941ab15b10552b39f1dc0f54 100644 |
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
@@ -363,8 +363,10 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() { |
} |
if (setting_source != SETTING_SOURCE_USER) { |
set_radio_group_enabled(false); |
+ set_custom_link_enabled(false); |
} else { |
set_radio_group_enabled(true); |
+ set_custom_link_enabled(true); |
} |
selected_item_ = radio_group.default_item; |
set_radio_group(radio_group); |
@@ -449,9 +451,14 @@ ContentSettingPluginBubbleModel::ContentSettingPluginBubbleModel( |
: ContentSettingSingleRadioGroup( |
delegate, web_contents, profile, content_type) { |
DCHECK_EQ(content_type, CONTENT_SETTINGS_TYPE_PLUGINS); |
- set_custom_link_enabled(web_contents && |
- TabSpecificContentSettings::FromWebContents( |
- web_contents)->load_plugins_link_enabled()); |
+ // Disable the "Run all plugins this time" link if the user already clicked on |
+ // the link. If the setting is controlled by policy then the link is already |
+ // disabled. Therfore only set the enabled state to false, never to true. |
+ if (web_contents && |
+ !TabSpecificContentSettings::FromWebContents( |
+ web_contents)->load_plugins_link_enabled()) { |
+ set_custom_link_enabled(false); |
+ } |
} |
ContentSettingPluginBubbleModel::~ContentSettingPluginBubbleModel() { |