Index: components/subresource_filter/content/renderer/subresource_filter_agent.cc |
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent.cc b/components/subresource_filter/content/renderer/subresource_filter_agent.cc |
index db21784a07a82402e299f75fb1a940ddb9fffb52..bf6ac6f618ea407de03710b06a8cb6686867646f 100644 |
--- a/components/subresource_filter/content/renderer/subresource_filter_agent.cc |
+++ b/components/subresource_filter/content/renderer/subresource_filter_agent.cc |
@@ -12,6 +12,7 @@ |
#include "components/subresource_filter/content/renderer/document_subresource_filter.h" |
#include "components/subresource_filter/content/renderer/ruleset_dealer.h" |
#include "components/subresource_filter/core/common/memory_mapped_ruleset.h" |
+#include "components/subresource_filter/core/common/scoped_timers.h" |
#include "components/subresource_filter/core/common/time_measurements.h" |
#include "content/public/common/browser_side_navigation_policy.h" |
#include "content/public/renderer/render_frame.h" |
@@ -60,6 +61,14 @@ void SubresourceFilterAgent:: |
render_frame()->GetRoutingID())); |
} |
+void SubresourceFilterAgent::SendDocumentLoadStatistics( |
+ base::TimeDelta evaluation_total_wall_duration, |
+ base::TimeDelta evaluation_total_cpu_duration) { |
+ render_frame()->Send(new SubresourceFilterHostMsg_DocumentLoadStatistics( |
+ render_frame()->GetRoutingID(), evaluation_total_wall_duration, |
+ evaluation_total_cpu_duration)); |
+} |
+ |
void SubresourceFilterAgent::OnActivateForProvisionalLoad( |
ActivationState activation_state, |
const GURL& url, |
@@ -113,6 +122,9 @@ void SubresourceFilterAgent::RecordHistogramsOnLoadFinished() { |
statistics.evaluation_total_cpu_duration, |
base::TimeDelta::FromMicroseconds(1), base::TimeDelta::FromSeconds(10), |
50); |
+ |
+ SendDocumentLoadStatistics(statistics.evaluation_total_wall_duration, |
+ statistics.evaluation_total_cpu_duration); |
} |
} |