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

Unified Diff: chrome/browser/ui/content_settings/content_setting_image_model.cc

Issue 2785923003: [subresource_filter] Clean up special cases in TabSpecificContentSettings (Closed)
Patch Set: remove dependent CL Created 3 years, 9 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
Index: chrome/browser/ui/content_settings/content_setting_image_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc
index e0b832de7a1fadedc7a2c1c314c730b40ebaf3f4..43bfc3e073eba46813e5c09e77da5f63e3acbdf8 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -426,9 +426,10 @@ void ContentSettingSubresourceFilterImageModel::UpdateFromWebContents(
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::FromWebContents(web_contents);
-
- if (!content_settings || !content_settings->IsSubresourceBlocked())
+ if (!content_settings || !content_settings->IsContentBlocked(
+ CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER)) {
return;
+ }
set_icon(kSubresourceFilterActiveIcon, kBlockedBadgeIcon);
set_explanatory_string_id(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_TITLE);
@@ -452,8 +453,8 @@ bool ContentSettingSubresourceFilterImageModel::ShouldRunAnimation(
return false;
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::FromWebContents(web_contents);
- return content_settings &&
- !content_settings->IsSubresourceBlockageIndicated();
+ return content_settings && !content_settings->IsBlockageIndicated(
+ CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER);
}
void ContentSettingSubresourceFilterImageModel::SetAnimationHasRun(
@@ -462,8 +463,10 @@ void ContentSettingSubresourceFilterImageModel::SetAnimationHasRun(
return;
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::FromWebContents(web_contents);
- if (content_settings)
- content_settings->SetSubresourceBlockageIndicated();
+ if (content_settings) {
+ content_settings->SetBlockageHasBeenIndicated(
+ CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER);
+ }
}
// Protocol handlers -----------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698