| 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 482778287962f8073fb32fb233b77774dac35273..0c068ffc6ceffb387ea16cbbb3fb6ad28952adda 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
|
| @@ -120,9 +120,6 @@ ContentSubresourceFilterDriverFactory::
|
| if (!url.SchemeIsHTTPOrHTTPS())
|
| return ActivationDecision::UNSUPPORTED_SCHEME;
|
|
|
| - if (client_->ShouldSuppressActivation(navigation_handle))
|
| - return ActivationDecision::URL_WHITELISTED;
|
| -
|
| switch (configurations->the_one_and_only().activation_scope) {
|
| case ActivationScope::ALL_SITES:
|
| return ActivationDecision::ACTIVATED;
|
| @@ -189,6 +186,13 @@ void ContentSubresourceFilterDriverFactory::WillProcessResponse(
|
|
|
| activation_decision_ =
|
| ComputeActivationDecisionForMainFrameNavigation(navigation_handle);
|
| +
|
| + // Check for the 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;
|
| DCHECK(activation_decision_ != ActivationDecision::UNKNOWN);
|
| if (activation_decision_ != ActivationDecision::ACTIVATED) {
|
| ResetActivationState();
|
|
|