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

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

Issue 2556433003: Support optional performance measuring in SubresourceFilter. (Closed)
Patch Set: Link TODO to a bug. Created 4 years 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 abd8a140db35609bb3d0e67a9db36f8e3884801c..e7b47a523771fc1aa624353330e4402bf89600ce 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
@@ -122,8 +122,14 @@ void ContentSubresourceFilterDriverFactory::ActivateForFrameHostIfNeeded(
content::RenderFrameHost* render_frame_host,
const GURL& url) {
if (activation_state_ != ActivationState::DISABLED) {
- DriverFromFrameHost(render_frame_host)
- ->ActivateForProvisionalLoad(GetMaximumActivationState(), url);
+ // TODO(pkalinnikov): Introduce a variation parameter controlling how often
+ // the |measure_performance| bit is set. crbug/672519
+ constexpr bool measure_performance = true;
+
+ auto* driver = DriverFromFrameHost(render_frame_host);
+ DCHECK(driver);
+ driver->ActivateForProvisionalLoad(GetMaximumActivationState(), url,
+ measure_performance);
}
}

Powered by Google App Engine
This is Rietveld 408576698