Chromium Code Reviews| Index: chrome/browser/content_settings/tab_specific_content_settings.cc |
| diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| index 53c98ae6abf396adb6c7eaa5cc7f3314cbcd97b2..f3d7d254794f7f86da7d250206f951b9ce7c860b 100644 |
| --- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
| +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| @@ -103,6 +103,8 @@ TabSpecificContentSettings::TabSpecificContentSettings(WebContents* tab) |
| pending_protocol_handler_setting_(CONTENT_SETTING_DEFAULT), |
| load_plugins_link_enabled_(true), |
| microphone_camera_state_(MICROPHONE_CAMERA_NOT_ACCESSED), |
| + subresource_filter_enabled_(false), |
| + subresource_filter_blockage_indicated_(false), |
| observer_(this) { |
| ClearBlockedContentSettingsExceptForCookies(); |
| ClearCookieSpecificContentSettings(); |
| @@ -257,6 +259,10 @@ bool TabSpecificContentSettings::IsContentBlocked( |
| return false; |
| } |
| +bool TabSpecificContentSettings::IsSubresourceBlocked() const { |
| + return subresource_filter_enabled_; |
| +} |
| + |
| bool TabSpecificContentSettings::IsBlockageIndicated( |
| ContentSettingsType content_type) const { |
| const auto& it = content_settings_status_.find(content_type); |
| @@ -265,11 +271,20 @@ bool TabSpecificContentSettings::IsBlockageIndicated( |
| return false; |
| } |
| +bool TabSpecificContentSettings::IsSubresourceBlockageIndicated() |
| + const { |
|
msramek
2016/07/27 15:47:40
nit: fits on the previous line
melandory
2016/07/28 14:04:56
Done.
|
| + return subresource_filter_blockage_indicated_; |
| +} |
| + |
| void TabSpecificContentSettings::SetBlockageHasBeenIndicated( |
| ContentSettingsType content_type) { |
| content_settings_status_[content_type].blockage_indicated_to_user = true; |
| } |
| +void TabSpecificContentSettings::SetSubresourceBlockageIndicated() { |
| + subresource_filter_blockage_indicated_ = true; |
| +} |
| + |
| bool TabSpecificContentSettings::IsContentAllowed( |
| ContentSettingsType content_type) const { |
| // This method currently only returns meaningful values for the content type |
| @@ -690,6 +705,10 @@ void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) { |
| content::NotificationService::NoDetails()); |
| } |
| +void TabSpecificContentSettings::SetSubresourceBlocked(bool enabled) { |
| + subresource_filter_enabled_ = enabled; |
| +} |
| + |
| void TabSpecificContentSettings::SetPepperBrokerAllowed(bool allowed) { |
| if (allowed) { |
| OnContentAllowed(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); |