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 b7969d7705d01efbf024f6f77a7e6f18659a16fc..29cfdbe0b9b86be0880af53e93f8f8a6ff75cfc9 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 |
@@ -13,6 +13,7 @@ |
#include <vector> |
#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
#include "base/supports_user_data.h" |
#include "base/time/time.h" |
#include "components/safe_browsing_db/util.h" |
@@ -31,6 +32,8 @@ class SafeBrowsingServiceTest; |
namespace subresource_filter { |
+struct Configuration; |
+class ConfigurationList; |
class SubresourceFilterClient; |
enum class ActivationLevel; |
enum class ActivationList; |
@@ -135,8 +138,11 @@ class ContentSubresourceFilterDriverFactory |
// Checks base on the value of |url| and current activation scope if |
// activation signal should be sent. |
- ActivationDecision ComputeActivationDecisionForMainFrameNavigation( |
- content::NavigationHandle* navigation_handle) const; |
+ void ComputeActivationDecisionForMainFrameNavigation( |
+ content::NavigationHandle* navigation_handle); |
+ ActivationDecision ComputePerConfigActivationDecisionForMainFrameNavigation( |
+ content::NavigationHandle* navigation_handle, |
+ const Configuration& configuration) const; |
bool DidURLMatchActivationList(const GURL& url, |
ActivationList activation_list) const; |
@@ -153,9 +159,16 @@ class ContentSubresourceFilterDriverFactory |
std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; |
- ActivationLevel activation_level_; |
- ActivationDecision activation_decision_; |
- bool measure_performance_; |
+ ActivationDecision activation_decision_ = ActivationDecision::UNKNOWN; |
+ bool measure_performance_ = false; |
+ |
+ // The configuration that caused activation for the last main frame |
+ // navigation, if any. |
+ const Configuration* configuration_ = nullptr; |
+ |
+ // Holds a reference to the ConfigurationList instance that contains the |
+ // configuration pointed to by |configuration_|. |
+ scoped_refptr<ConfigurationList> configuration_owner_; |
// The URLs in the navigation chain. |
std::vector<GURL> navigation_chain_; |