| 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 525410cd7ac64bbe61a81541991868d353fb70cb..7c151c0673e6896ede7246283630c1f5801f82a3 100644
|
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
|
| @@ -326,6 +326,8 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
|
| SettingSource setting_source = SETTING_SOURCE_NONE;
|
| bool setting_is_wildcard = false;
|
|
|
| + HostContentSettingsMap* map =
|
| + HostContentSettingsMapFactory::GetForProfile(profile());
|
| if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) {
|
| content_settings::CookieSettings* cookie_settings =
|
| CookieSettingsFactory::GetForProfile(profile()).get();
|
| @@ -333,8 +335,6 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
|
| url, url, true, &setting_source);
|
| } else {
|
| SettingInfo info;
|
| - HostContentSettingsMap* map =
|
| - HostContentSettingsMapFactory::GetForProfile(profile());
|
| std::unique_ptr<base::Value> value =
|
| map->GetWebsiteSetting(url, url, content_type(), std::string(), &info);
|
| setting = content_settings::ValueToContentSetting(value.get());
|
| @@ -361,11 +361,12 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
|
|
|
| set_setting_is_managed(setting_source != SETTING_SOURCE_USER &&
|
| setting != CONTENT_SETTING_ASK);
|
| - if (setting_source != SETTING_SOURCE_USER) {
|
| - set_radio_group_enabled(false);
|
| - } else {
|
| - set_radio_group_enabled(true);
|
| - }
|
| +
|
| + // Radio buttons are enabled iff user can edit exceptions in settings.
|
| + bool user_exception_allowed =
|
| + map->AreUserExceptionsAllowedForType(content_type());
|
| + set_radio_group_enabled(user_exception_allowed);
|
| +
|
| selected_item_ = radio_group.default_item;
|
| set_radio_group(radio_group);
|
| }
|
|
|