Index: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc |
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc |
index 7e856982e755f5a489d1c12440472a77a01a678b..4994ed78c5612c2c64fdf12fef52eae341075fea 100644 |
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc |
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc |
@@ -126,12 +126,6 @@ void ContentSubresourceFilterDriverFactory:: |
return; |
} |
- if (client_->ShouldSuppressActivation(navigation_handle)) { |
- activation_decision_ = ActivationDecision::URL_WHITELISTED; |
- activation_options_ = Configuration::ActivationOptions(); |
- return; |
- } |
- |
activation_options_ = highest_priority_activated_config->activation_options; |
activation_decision_ = |
activation_options_.activation_level == ActivationLevel::DISABLED |
@@ -202,6 +196,16 @@ void ContentSubresourceFilterDriverFactory::WillProcessResponse( |
ComputeActivationForMainFrameNavigation(navigation_handle); |
DCHECK_NE(activation_decision_, ActivationDecision::UNKNOWN); |
+ |
+ // Check for whitelisted status last, so that the client gets an accurate |
+ // indication of whether there would be activation otherwise. |
+ bool whitelisted = client_->OnPageActivationComputed( |
+ navigation_handle, activation_decision_ == ActivationDecision::ACTIVATED); |
+ if (whitelisted) { |
+ activation_decision_ = ActivationDecision::URL_WHITELISTED; |
+ activation_options_ = Configuration::ActivationOptions(); |
+ } |
+ |
if (activation_decision_ != ActivationDecision::ACTIVATED) { |
DCHECK_EQ(activation_options_.activation_level, ActivationLevel::DISABLED); |
return; |