Chromium Code Reviews| 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..d12879cdd93bc7fc1d979a1daf8104d211c3d3da 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,10 @@ 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. Contains statistics about |
|
engedy
2016/12/28 09:36:02
Phrasing suggestion: ..., and contains statistics
pkalinnikov
2016/12/28 13:43:22
Done.
|
| +// different phases of subresource filtering in DocumentSubresourceFilter, and |
| +// total time spent on evaluating subresource loads in its allowLoad method. The |
| +// time equals to zero if performance measurements were disabled for the load. |
|
engedy
2016/12/28 09:36:02
nit: The time metrics are equal to...
pkalinnikov
2016/12/28 13:43:23
Done.
|
| +IPC_MESSAGE_ROUTED1( |
| + SubresourceFilterHostMsg_DocumentLoadStatistics, |
| + subresource_filter::DocumentLoadStatistics /* statistics */); |