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 1e0e4103bae8ebe12f63768736bce439a21c68aa..a9e6945a0e9fb58704c804698f34d85648fe785b 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 |
| @@ -5,22 +5,19 @@ |
| #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER_DRIVER_FACTORY_H_ |
| #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER_DRIVER_FACTORY_H_ |
| -#include <map> |
| #include <memory> |
| -#include <set> |
| -#include <string> |
| -#include <utility> |
| -#include <vector> |
| #include "base/macros.h" |
| -#include "base/time/time.h" |
| #include "components/safe_browsing_db/util.h" |
| #include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h" |
| #include "components/subresource_filter/core/browser/subresource_filter_features.h" |
| #include "content/public/browser/web_contents_observer.h" |
| #include "content/public/browser/web_contents_user_data.h" |
| #include "ui/base/page_transition_types.h" |
| -#include "url/gurl.h" |
| + |
| +namespace base { |
| +class GURL; |
| +} // namespace base |
| namespace content { |
| class WebContents; |
| @@ -36,9 +33,6 @@ class SubresourceFilterClient; |
| enum class ActivationLevel; |
| enum class ActivationList; |
| -using URLToActivationListsMap = |
| - std::unordered_map<std::string, std::set<ActivationList>>; |
| - |
| // Controls the activation of subresource filtering for each page load in a |
| // WebContents and is responsible for sending the activation signal to all the |
| // per-frame SubresourceFilterAgents on the renderer side. |
| @@ -95,7 +89,7 @@ class ContentSubresourceFilterDriverFactory |
| // blacklist is the Safe Browsing Social Engineering ads landing, then |url| |
| // and |redirects| are saved. |
|
shivanisha
2017/05/18 19:54:21
Need to change the comment since |url| is no longe
Charlie Harrison
2017/05/18 20:22:41
Yeah actually the whole comment is wrong :/ I've c
|
| void OnMainResourceMatchedSafeBrowsingBlacklist( |
| - const GURL& url, |
| + content::NavigationHandle* navigation_handle, |
| safe_browsing::SBThreatType threat_type, |
| safe_browsing::ThreatPatternType threat_type_metadata); |
| @@ -110,8 +104,6 @@ class ContentSubresourceFilterDriverFactory |
| // ContentSubresourceFilterThrottleManager::Delegate: |
| void OnFirstSubresourceLoadDisallowed() override; |
| - void WillProcessResponse( |
| - content::NavigationHandle* navigation_handle) override; |
| ContentSubresourceFilterThrottleManager* throttle_manager() { |
| return throttle_manager_.get(); |
| @@ -132,18 +124,15 @@ class ContentSubresourceFilterDriverFactory |
| // Checks base on the value of |url| and current activation scope if |
| // activation signal should be sent. |
| void ComputeActivationForMainFrameNavigation( |
| - content::NavigationHandle* navigation_handle); |
| + content::NavigationHandle* navigation_handle, |
| + ActivationList matched_list); |
| // Returns whether a main-frame navigation to the given |url| satisfies the |
| // activation |conditions| of a given configuration, except for |priority|. |
| bool DoesMainFrameURLSatisfyActivationConditions( |
| const GURL& url, |
| - const Configuration::ActivationConditions& conditions) const; |
| - |
| - bool DidURLMatchActivationList(const GURL& url, |
| - ActivationList activation_list) const; |
| - |
| - void AddActivationListMatch(const GURL& url, ActivationList match_type); |
| + const Configuration::ActivationConditions& conditions, |
| + ActivationList matched_list) const; |
| // Must outlive this class. |
| SubresourceFilterClient* client_; |
| @@ -170,8 +159,6 @@ class ContentSubresourceFilterDriverFactory |
| // throttles are not invoked). |
| Configuration::ActivationOptions activation_options_; |
| - URLToActivationListsMap activation_list_matches_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |
| }; |