Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index 01bf05f44b1f5af42dec7efc152ff2bc1a5ddd88..b057de298e584e5d7d06e0873e59685078d57f15 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -1602,6 +1602,13 @@ void RenderFrameHostImpl::OnRunJavaScriptMessage( |
| const GURL& frame_url, |
| JavaScriptMessageType type, |
| IPC::Message* reply_msg) { |
| + int32_t message_length = static_cast<int32_t>(message.length()); |
|
dominickn
2016/09/20 07:22:09
Nit: size_t? Or uint32_t?
Avi (use Gerrit)
2016/09/20 14:18:49
I stole this from earlier UMA code I wrote, and it
|
| + if (GetParent()) { |
| + UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.Subframe", message_length); |
| + } else { |
| + UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.MainFrame", message_length); |
| + } |
| + |
| // While a JS message dialog is showing, tabs in the same process shouldn't |
| // process input events. |
| GetProcess()->SetIgnoreInputEvents(true); |