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

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

Issue 2893183002: [subresource_filter] Use the SubresourceFilterObserver for PageLoadMetrics (Closed)
Patch Set: bmcquade review Created 3 years, 6 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 cff5203f629e1634cff32f5159498c76a21ded6c..663aa6e2f4363dcc121253261d6b8f34c1605414 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
@@ -73,12 +73,10 @@ void ContentSubresourceFilterDriverFactory::NotifyPageActivationComputed(
activation_decision_ = activation_decision;
activation_options_ = matched_options;
DCHECK_NE(activation_decision_, ActivationDecision::UNKNOWN);
- if (activation_decision_ != ActivationDecision::ACTIVATED) {
- DCHECK_EQ(activation_options_.activation_level, ActivationLevel::DISABLED);
- return;
- }
- DCHECK_NE(activation_options_.activation_level, ActivationLevel::DISABLED);
+ // ACTIVATION_DISABLED implies DISABLED activation level.
+ DCHECK(activation_decision_ != ActivationDecision::ACTIVATION_DISABLED ||
+ activation_options_.activation_level == ActivationLevel::DISABLED);
ActivationState state = ActivationState(activation_options_.activation_level);
state.measure_performance = ShouldMeasurePerformanceForPageLoad(
activation_options_.performance_measurement_rate);

Powered by Google App Engine
This is Rietveld 408576698