| Index: components/content_settings/core/browser/host_content_settings_map.cc
|
| diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
|
| index d1151eab85af2a51fa622b979cda1d05674ff2a3..fd8407b1e2d3d829085edaa9965a54294831c28d 100644
|
| --- a/components/content_settings/core/browser/host_content_settings_map.cc
|
| +++ b/components/content_settings/core/browser/host_content_settings_map.cc
|
| @@ -453,6 +453,9 @@ void HostContentSettingsMap::SetContentSettingDefaultScope(
|
| content_type);
|
| DCHECK(info);
|
|
|
| + ContentSetting previous_value = GetContentSetting(
|
| + primary_url, secondary_url, content_type, resource_identifier);
|
| +
|
| content_settings::PatternPair patterns =
|
| GetPatternsFromScopingType(info->website_settings_info()->scoping_type(),
|
| primary_url, secondary_url);
|
| @@ -463,6 +466,24 @@ void HostContentSettingsMap::SetContentSettingDefaultScope(
|
|
|
| SetContentSetting(primary_pattern, secondary_pattern, content_type,
|
| resource_identifier, setting);
|
| +
|
| + ContentSetting final_value = GetContentSetting(
|
| + primary_url, secondary_url, content_type, resource_identifier);
|
| +
|
| + bool final_value_not_allowed =
|
| + final_value == CONTENT_SETTING_BLOCK ||
|
| + (final_value == CONTENT_SETTING_ASK &&
|
| + GetDefaultContentSetting(content_type, nullptr) !=
|
| + CONTENT_SETTING_ALLOW);
|
| +
|
| + if (previous_value == CONTENT_SETTING_ALLOW && final_value_not_allowed) {
|
| + FOR_EACH_OBSERVER(content_settings::Observer,
|
| + observers_,
|
| + OnContentSettingRevoked(primary_url,
|
| + secondary_url,
|
| + content_type,
|
| + resource_identifier));
|
| + }
|
| }
|
|
|
| ContentSetting HostContentSettingsMap::GetContentSettingAndMaybeUpdateLastUsage(
|
|
|