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..f918c9c13ef12c6c6099bd6712f15148c01aea78 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 |
@@ -17,6 +17,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 "ui/base/page_transition_types.h" |
#include "url/gurl.h" |
@@ -125,18 +126,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; |
@@ -153,9 +157,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_ |
Charlie Harrison
2017/05/03 14:52:17
Optional:
Since driver factory is going away this
engedy
2017/05/05 12:25:41
We discussed offline that due to subtle timing con
Charlie Harrison
2017/05/05 13:12:52
I think keeping as-is is ok, and we'll rethink onc
|
+ // 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_; |