Chromium Code Reviews| 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..e84d859fea360ae2af503c17f03f5ac8075ffc15 100644 |
| --- a/chrome/browser/content_settings/tab_specific_content_settings.h |
| +++ b/chrome/browser/content_settings/tab_specific_content_settings.h |
| @@ -37,6 +37,13 @@ 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 use a map<WebContents*, bool> in the |
|
Bernhard Bauer
2016/07/27 19:27:44
Instead of using a map, could you attach this info
melandory
2016/07/28 14:04:56
Done.
|
| +// ContentSettingMediaImageModel. |
| + |
| // 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 +186,26 @@ class TabSpecificContentSettings |
| // Changes the |content_blocked_| entry for downloads. |
| void SetDownloadsBlocked(bool blocked); |
| + void SetSubresourceBlocked(bool enabled); |
|
msramek
2016/07/27 15:47:40
nit: Comments for public methods, here and below.
melandory
2016/07/28 14:04:56
Done.
|
| + |
| // 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. |
| + bool IsSubresourceBlocked() const; |
|
raymes
2016/07/28 05:10:58
Again, we could make several simplifications here
melandory
2016/07/28 14:04:56
Added TODO.
|
| + |
| // 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); |
| + void SetSubresourceBlockageIndicated(); |
| + |
| // Returns whether a particular kind of content has been allowed. Currently |
| // only tracks cookies. |
| bool IsContentAllowed(ContentSettingsType content_type) const; |
| @@ -467,6 +485,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_; |