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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2352753002: Collect more UMA data about dialogs and site engagement. (Closed)
Patch Set: nit Created 4 years, 3 months 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: 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());
+ 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);
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698