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

Unified Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h

Issue 2396133003: Change the logic how Subesource Filter propagates activation. (Closed)
Patch Set: fix test, for real now Created 4 years, 2 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: 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..248d75bca76c03cad2925e0e743d197d503dc5e4 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
@@ -68,6 +68,8 @@ class ContentSubresourceFilterDriverFactory
// 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|
@@ -98,6 +100,7 @@ class ContentSubresourceFilterDriverFactory
const HostSet& activation_set() const { return activate_on_hosts_; }
const HostSet& whitelisted_set() const { return whitelisted_hosts_; }
+ const HostSet& hits_set() const { return hits_hosts_; }
ActivationState activation_state() { return activation_state_; }
private:
@@ -136,6 +139,8 @@ class ContentSubresourceFilterDriverFactory
void set_activation_state(const ActivationState& new_activation_state);
+ bool IsHit(const GURL& url) const;
+
static const char kWebContentsUserDataKey[];
FrameHostToOwnedDriverMap frame_drivers_;
@@ -144,6 +149,10 @@ class ContentSubresourceFilterDriverFactory
HostSet activate_on_hosts_;
Jialiu Lin 2016/10/07 21:54:27 (Please correct me if I missed something) It seems
melandory 2016/10/11 15:54:17 Yes, it's true. We had a discussion within the tea
HostSet whitelisted_hosts_;
+ // List of hosts, where the Safe Browsing detected hit to the list of
+ // interest.
+ HostSet hits_hosts_;
Jialiu Lin 2016/10/07 21:54:27 nit: maybe add more comments to explain the differ
+
ActivationState activation_state_;
DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);

Powered by Google App Engine
This is Rietveld 408576698