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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 2171713002: Safe browsing subresource filter bubble UI skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Verified xib file Created 4 years, 5 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/content_settings/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index dc20cd102122327bfc9bba8173c947eaabe916de..6f0b92c29e284a763507353fc80e81cdc2e4c31e 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -37,6 +37,12 @@ namespace net {
class CookieOptions;
}
+// TODO(msramek): Subresource filter and media currently are storing their state
+// in TabSpecificContentSettings: |microphone_camera_state_| and
+// |subresource_filter_enabled_| without being tied either to a single content
+// setting or to any content setting. This state is not ideal, potential
+// solution is to save this information via content::WebContentsUserData
+
// This class manages state about permissions, content settings, cookies and
// site data for a specific WebContents. It tracks which content was accessed
// and which content was blocked. Based on this it provides information about
@@ -179,15 +185,31 @@ class TabSpecificContentSettings
// Changes the |content_blocked_| entry for downloads.
void SetDownloadsBlocked(bool blocked);
+ // Changes |subresource_filter_enabled_| entry for the Safe Browsing
+ // Subresource Filter.
+ void SetSubresourceBlocked(bool enabled);
+
// Returns whether a particular kind of content has been blocked for this
// page.
bool IsContentBlocked(ContentSettingsType content_type) const;
+ // Returns true if Safe Browsing Subresource Filter is active for the page.
+ // TODO(melandory): revisit this method if/once content setting will be added.
+ bool IsSubresourceBlocked() const;
+
// Returns true if content blockage was indicated to the user.
bool IsBlockageIndicated(ContentSettingsType content_type) const;
+ // Returns true if the activation of the Safe Browsing Subresource Filter was
+ // indicated to the user.
+ bool IsSubresourceBlockageIndicated() const;
+
void SetBlockageHasBeenIndicated(ContentSettingsType content_type);
+ // Changes |subresource_filter_blockage_indicated_| in order to mark that
+ // Safe Browsing Subresource Filter was activated.
+ void SetSubresourceBlockageIndicated();
+
// Returns whether a particular kind of content has been allowed. Currently
// only tracks cookies.
bool IsContentAllowed(ContentSettingsType content_type) const;
@@ -467,6 +489,10 @@ class TabSpecificContentSettings
std::string media_stream_requested_audio_device_;
std::string media_stream_requested_video_device_;
+ // Manages information about Subresource filtering activation.
+ bool subresource_filter_enabled_;
+ bool subresource_filter_blockage_indicated_;
+
// Observer to watch for content settings changed.
ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
« no previous file with comments | « chrome/app/nibs/ContentSubresourceFilter.xib ('k') | chrome/browser/content_settings/tab_specific_content_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698