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

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

Issue 2060313002: Navigation throttle for the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-tab-activation
Patch Set: comments Created 4 years, 6 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 29a7e73d22e7fb92f6ef44911b5ccbdde2575381..110d044ee74e24887abb1a85629e6b2e47ee7299 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
@@ -49,19 +49,26 @@ class ContentSubresourceFilterDriverFactory
const GURL& url,
const std::vector<GURL>& redirect_urls,
safe_browsing::ThreatPatternType threat_type);
- const OriginSet& activation_set() { return activate_on_origins_; }
- bool ShouldActivateForURL(const GURL& url);
+ const OriginSet& activation_set() const { return activate_on_origins_; }
+ bool ShouldActivateForURL(const GURL& url) const;
+ void AddOriginOfURLToActivationSet(const GURL& url);
+
+ ContentSubresourceFilterDriver* DriverFromFrameHost(
+ content::RenderFrameHost* render_frame_host);
private:
+ friend class SubresourceFilterNavigationThrottleTest;
+
typedef std::map<content::RenderFrameHost*,
std::unique_ptr<ContentSubresourceFilterDriver>>
FrameHostToOwnedDriverMap;
+ void SetDriverForFrameHostForTesting(
+ content::RenderFrameHost* render_frame_host,
+ std::unique_ptr<ContentSubresourceFilterDriver> driver);
+
void CreateDriverForFrameHostIfNeeded(
content::RenderFrameHost* render_frame_host);
- ContentSubresourceFilterDriver* DriverFromFrameHost(
- content::RenderFrameHost* render_frame_host);
-
// content::WebContentsObserver:
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;

Powered by Google App Engine
This is Rietveld 408576698