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

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: fix optional decl Created 3 years, 7 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 ebed18f52b6289869060ec0b50fe3e5d2072e1da..f36ca425ee335d0100074dde85ecce01a4db9dc9 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
@@ -111,12 +111,9 @@ void ContentSubresourceFilterDriverFactory::OnSafeBrowsingMatchComputed(
activation_options_ = Configuration::ActivationOptions();
}
- 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