| 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 17967d31f7763aa4336aee91b8d3adf9fc154dfd..1447549a8ba81f5a4c9f4a594e5e6613aef68272 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
|
| @@ -16,6 +16,7 @@
|
| #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"
|
| @@ -123,18 +124,21 @@ class ContentSubresourceFilterDriverFactory
|
| friend class ContentSubresourceFilterDriverFactoryTest;
|
| friend class safe_browsing::SafeBrowsingServiceTest;
|
|
|
| - void ResetActivationState();
|
| -
|
| // content::WebContentsObserver:
|
| void DidStartNavigation(
|
| content::NavigationHandle* navigation_handle) override;
|
| void DidRedirectNavigation(
|
| content::NavigationHandle* navigation_handle) override;
|
| + void DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) override;
|
|
|
| // 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 ComputeActivationForMainFrameNavigation(
|
| + content::NavigationHandle* navigation_handle);
|
| + ActivationDecision ComputePerConfigActivationDecisionForMainFrameNavigation(
|
| + content::NavigationHandle* navigation_handle,
|
| + const Configuration& configuration) const;
|
|
|
| bool DidURLMatchActivationList(const GURL& url,
|
| ActivationList activation_list) const;
|
| @@ -152,9 +156,25 @@ class ContentSubresourceFilterDriverFactory
|
|
|
| std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_;
|
|
|
| - ActivationLevel activation_level_;
|
| - ActivationDecision activation_decision_;
|
| - bool measure_performance_;
|
| + // The activation decision corresponding to the most recently _started_
|
| + // non-same-document navigation in the main frame.
|
| + //
|
| + // The value is reset to ActivationDecision::UNKNOWN at the start of each such
|
| + // navigation, and will not be assigned until the navigation successfully
|
| + // reaches the WillProcessResponse stage (or successfully finishes if
|
| + // throttles are not invoked). This means that after a cancelled or otherwise
|
| + // unsuccessful navigation, the value will be left at UNKNOWN indefinitely.
|
| + ActivationDecision activation_decision_ =
|
| + ActivationDecision::ACTIVATION_DISABLED;
|
| +
|
| + // The activation options corresponding to the most recently _committed_
|
| + // non-same-document navigation in the main frame.
|
| + //
|
| + // The value corresponding to the previous such navigation will be retained,
|
| + // and the new value not assigned until a subsequent navigation successfully
|
| + // reaches the WillProcessResponse stage (or successfully finishes if
|
| + // throttles are not invoked).
|
| + Configuration::ActivationOptions activation_options_;
|
|
|
| // The URLs in the navigation chain.
|
| std::vector<GURL> navigation_chain_;
|
|
|