Chromium Code Reviews| Index: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h |
| diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h |
| index 2c9b4d43ff028fef7046d187a6785fe3786b0246..4b1cc04a8e13258c3e93ec95f6e2f8ccfea3d003 100644 |
| --- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h |
| +++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h |
| @@ -56,18 +56,13 @@ class ContentSubresourceFilterDriverFactory |
| bool IsWhitelisted(const GURL& url) const; |
| bool IsBlacklisted(const GURL& url) const; |
| - // Returns true if the subresource filtering should be active for the |url|. |
| - bool ShouldActivateForURL(const GURL& url) const; |
| - |
| - // Adds the host of the |url| to the set of hosts for which Subresource |
| - // Filtering should be active for the lifetime of this WebContents. |
| - void AddHostOfURLToActivationSet(const GURL& url); |
| - |
| // Whitelists the host of |url|, so that page loads with the main-frame |
| // document being loaded from this host will be exempted from subresource |
| // filtering for the lifetime of this WebContents. |
| void AddHostOfURLToWhitelistSet(const GURL& url); |
| + void AddToActivationHitsSet(const GURL& url); |
| + |
| // Called when Safe Browsing detects that the |url| corresponding to the load |
| // of the main frame belongs to the blacklist with |threat_type|. If the |
| // blacklist is the Safe Browsing Social Engineering ads landing, then |url| |
| @@ -96,7 +91,7 @@ class ContentSubresourceFilterDriverFactory |
| content::RenderFrameHost* render_frame_host, |
| const GURL& url); |
| - const HostSet& activation_set() const { return activate_on_hosts_; } |
| + const HostSet& hits_set() const { return hits_hosts_; } |
| const HostSet& whitelisted_set() const { return whitelisted_hosts_; } |
| ActivationState activation_state() { return activation_state_; } |
| @@ -136,14 +131,21 @@ class ContentSubresourceFilterDriverFactory |
| void set_activation_state(const ActivationState& new_activation_state); |
| + bool IsHit(const GURL& url) const; |
| + |
| static const char kWebContentsUserDataKey[]; |
| FrameHostToOwnedDriverMap frame_drivers_; |
| std::unique_ptr<SubresourceFilterClient> client_; |
| - HostSet activate_on_hosts_; |
| HostSet whitelisted_hosts_; |
| + // List of host+path of the URLs, where the Safe Browsing detected hit |
|
engedy
2016/10/12 09:32:29
nit: Extra words in this sentence.
melandory
2016/10/12 12:29:00
Haven't found them, but changed the formulation, s
engedy
2016/10/12 12:47:05
Phrasing suggestion:
During the course of one nav
|
| + // to the list of interest. When the navigation is commited this list is used |
| + // to determine whenever the activation signal should be send, then all |
|
engedy
2016/10/12 09:32:29
nit: s/send/sent/
melandory
2016/10/12 12:29:00
Done.
|
| + // entities is deleted from the list. |
|
engedy
2016/10/12 09:32:29
nit: s/is/are/
melandory
2016/10/12 12:29:00
Done.
|
| + HostSet hits_hosts_; |
|
engedy
2016/10/12 09:32:29
This set no longer stores hosts, but host+path pai
melandory
2016/10/12 12:29:00
Done.
engedy
2016/10/12 12:47:05
Please see the two other requests in this comment
|
| + |
| ActivationState activation_state_; |
| DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |