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

Unified Diff: ash/touch/touch_uma.cc

Issue 10834070: ash: Add some UMA for touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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: ash/touch/touch_uma.cc
diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc
index 9438cce762e8c2ce50bbaf9c6b16fae883d81c13..190d08a717cf44fd9ddd9fb0788aa157445d4509 100644
--- a/ash/touch/touch_uma.cc
+++ b/ash/touch/touch_uma.cc
@@ -4,6 +4,7 @@
#include "ash/touch/touch_uma.h"
+#include "ash/shell_delegate.h"
#include "base/metrics/histogram.h"
#include "base/stringprintf.h"
#include "ui/aura/event.h"
@@ -224,7 +225,14 @@ void TouchUMA::RecordGestureEvent(aura::Window* target,
void TouchUMA::RecordTouchEvent(aura::Window* target,
const aura::TouchEvent& event) {
- // TODO(sad|rjkroege): Figure out what to do (heat map?).
+ if (event.type() == ui::ET_TOUCH_PRESSED) {
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_TOUCHSCREEN_TAP_DOWN);
+ }
+
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius",
+ static_cast<int>(std::max(event.radius_x(), event.radius_y())),
+ 1, 500, 100);
Rick Byers 2012/07/31 20:37:36 This seems reasonable to me. We've seen radii > 5
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698