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

Unified Diff: content/renderer/render_frame_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/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6fba0086fafb042e8b701137e7d0f786e313bdb7..48f0183ed0ba72e1ae632028c1a41d224b87eec7 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2265,6 +2265,15 @@ bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type,
if (suppress_further_dialogs_)
return false;
+ int32_t message_length = static_cast<int32_t>(message.length());
+ if (WebUserGestureIndicator::processedUserGestureSinceLoad()) {
+ UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.UserGestureSinceLoad",
+ message_length);
+ } else {
+ UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.NoUserGestureSinceLoad",
+ message_length);
+ }
+
bool success = false;
base::string16 result_temp;
if (!result)
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | third_party/WebKit/Source/web/WebUserGestureIndicator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698