Index: components/subresource_filter/content/common/subresource_filter_messages.h |
diff --git a/components/subresource_filter/content/common/subresource_filter_messages.h b/components/subresource_filter/content/common/subresource_filter_messages.h |
index 33aaaee1f2a16c5f98ecc042ed38a1a14dd8b3f9..c1c92acf6c03cbf49a499016eba8d5e9bf6ad9c5 100644 |
--- a/components/subresource_filter/content/common/subresource_filter_messages.h |
+++ b/components/subresource_filter/content/common/subresource_filter_messages.h |
@@ -5,6 +5,7 @@ |
// Message definition file, included multiple times, hence no include guard. |
#include "base/time/time.h" |
+#include "components/subresource_filter/content/common/document_load_statistics.h" |
#include "components/subresource_filter/core/common/activation_state.h" |
#include "content/public/common/common_param_traits_macros.h" |
#include "ipc/ipc_message_macros.h" |
@@ -17,6 +18,15 @@ |
IPC_ENUM_TRAITS_MAX_VALUE(subresource_filter::ActivationState, |
subresource_filter::ActivationState::LAST); |
+IPC_STRUCT_TRAITS_BEGIN(subresource_filter::DocumentLoadStatistics) |
+ IPC_STRUCT_TRAITS_MEMBER(num_loads_total) |
+ IPC_STRUCT_TRAITS_MEMBER(num_loads_evaluated) |
+ IPC_STRUCT_TRAITS_MEMBER(num_loads_matching_rules) |
+ IPC_STRUCT_TRAITS_MEMBER(num_loads_disallowed) |
+ IPC_STRUCT_TRAITS_MEMBER(evaluation_total_wall_duration) |
+ IPC_STRUCT_TRAITS_MEMBER(evaluation_total_cpu_duration) |
+IPC_STRUCT_TRAITS_END() |
+ |
// ---------------------------------------------------------------------------- |
// Messages sent from the browser to the renderer. |
// ---------------------------------------------------------------------------- |
@@ -46,9 +56,11 @@ IPC_MESSAGE_ROUTED3(SubresourceFilterMsg_ActivateForProvisionalLoad, |
IPC_MESSAGE_ROUTED0(SubresourceFilterHostMsg_DidDisallowFirstSubresource); |
// This is sent to a RenderFrameHost in the browser when a document load is |
-// finished, just before the DidFinishLoad message, if performance measurements |
-// were enabled for the load. Contains the total time spent on evaluating |
-// subresource loads in DocumentSubresourceFilter::allowLoad() for a frame. |
-IPC_MESSAGE_ROUTED2(SubresourceFilterHostMsg_DocumentLoadStatistics, |
- base::TimeDelta /* evaluation_total_wall_duration */, |
- base::TimeDelta /* evaluation_total_cpu_duration */); |
+// finished, just before the DidFinishLoad message, and contains statistics |
+// collected by the DocumentSubresourceFilter up until that point: the number of |
+// subresources evaluated/disallowed/etc, and total time spent on evaluating |
+// subresource loads in its allowLoad method. The time metrics are equal to zero |
+// if performance measurements were disabled for the load. |
+IPC_MESSAGE_ROUTED1( |
+ SubresourceFilterHostMsg_DocumentLoadStatistics, |
+ subresource_filter::DocumentLoadStatistics /* statistics */); |