Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc

Issue 2795053002: [subresource_filter] Implement the "Smart" UI on Android (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 df3f8c171f7ec4aa6ac1288197854833ce5457fc..a5c8d77688d6d67422de63bf16ec17616119a2a2 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
@@ -201,17 +201,19 @@ void ContentSubresourceFilterDriverFactory::WillProcessResponse(
DCHECK(activation_decision_ != ActivationDecision::UNKNOWN);
if (activation_decision_ != ActivationDecision::ACTIVATED) {
ResetActivationState();
- return;
+ } else {
+ activation_level_ = configurations->the_one_and_only().activation_level;
+ measure_performance_ =
+ activation_level_ != ActivationLevel::DISABLED &&
+ ShouldMeasurePerformanceForPageLoad(
+ configurations->the_one_and_only().performance_measurement_rate);
}
- activation_level_ = configurations->the_one_and_only().activation_level;
- measure_performance_ =
- activation_level_ != ActivationLevel::DISABLED &&
- ShouldMeasurePerformanceForPageLoad(
- configurations->the_one_and_only().performance_measurement_rate);
ActivationState state = ActivationState(activation_level_);
state.measure_performance = measure_performance_;
- throttle_manager_->NotifyPageActivationComputed(navigation_handle, state);
+
+ if (activation_level_ != ActivationLevel::DISABLED)
+ throttle_manager_->NotifyPageActivationComputed(navigation_handle, state);
}
void ContentSubresourceFilterDriverFactory::OnFirstSubresourceLoadDisallowed() {

Powered by Google App Engine
This is Rietveld 408576698