Chromium Code Reviews| Index: ash/touch/touch_uma.cc |
| diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc |
| index db9f07e1b215e6e33505d995e7a390030d24ee3b..c9672018974db20ea5923205eb6ec2122f90ed9f 100644 |
| --- a/ash/touch/touch_uma.cc |
| +++ b/ash/touch/touch_uma.cc |
| @@ -44,7 +44,7 @@ enum UMAEventType { |
| UMA_ET_GESTURE_PINCH_END, |
| UMA_ET_GESTURE_PINCH_UPDATE, |
| UMA_ET_GESTURE_LONG_PRESS, |
| - UMA_ET_GESTURE_MULTIFINGER_SWIPE, |
| + UMA_ET_GESTURE_MULTIFINGER_SWIPE_2, |
|
sky
2014/05/27 17:27:54
Document what this and swipe 1 is.
sky
2014/05/27 17:27:54
Can you move all the UMA_ET_GESTURE_MULTIFINGER_SW
Alexei Svitkine (slow)
2014/05/27 17:29:12
If this is used in UMA enum histograms (which it l
sky
2014/05/27 17:36:33
Bummer. If that is the case we should have that wa
mfomitchev
2014/05/27 18:33:43
Done.
mfomitchev
2014/05/27 18:33:43
Done.
|
| UMA_ET_SCROLL, |
| UMA_ET_SCROLL_FLING_START, |
| UMA_ET_SCROLL_FLING_CANCEL, |
| @@ -59,6 +59,7 @@ enum UMAEventType { |
| UMA_ET_GESTURE_SHOW_PRESS, |
| UMA_ET_GESTURE_TAP_CANCEL, |
| UMA_ET_GESTURE_WIN8_EDGE_SWIPE, |
| + UMA_ET_GESTURE_MULTIFINGER_SWIPE_1, |
| // NOTE: Add new event types only immediately above this line. Make sure to |
| // update the UIEventType enum in tools/metrics/histograms/histograms.xml |
| // accordingly. |
| @@ -113,13 +114,13 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { |
| case ui::ET_GESTURE_SCROLL_UPDATE: { |
| const ui::GestureEvent& gesture = |
| static_cast<const ui::GestureEvent&>(event); |
| - if (gesture.details().touch_points() >= 4) |
| - return UMA_ET_GESTURE_SCROLL_UPDATE_4P; |
| - else if (gesture.details().touch_points() == 3) |
| - return UMA_ET_GESTURE_SCROLL_UPDATE_3; |
| + if (gesture.details().touch_points() == 1) |
| + return UMA_ET_GESTURE_SCROLL_UPDATE; |
| else if (gesture.details().touch_points() == 2) |
| return UMA_ET_GESTURE_SCROLL_UPDATE_2; |
| - return UMA_ET_GESTURE_SCROLL_UPDATE; |
| + else if (gesture.details().touch_points() == 3) |
| + return UMA_ET_GESTURE_SCROLL_UPDATE_3; |
| + return UMA_ET_GESTURE_SCROLL_UPDATE_4P; |
|
tdresser
2014/05/27 12:07:31
Thanks for catching this case - I think this does
|
| } |
| case ui::ET_GESTURE_TAP: { |
| const ui::GestureEvent& gesture = |
| @@ -159,14 +160,16 @@ UMAEventType UMAEventTypeFromEvent(const ui::Event& event) { |
| return UMA_ET_GESTURE_LONG_PRESS; |
| case ui::ET_GESTURE_LONG_TAP: |
| return UMA_ET_GESTURE_LONG_TAP; |
| - case ui::ET_GESTURE_MULTIFINGER_SWIPE: { |
| + case ui::ET_GESTURE_SWIPE: { |
| const ui::GestureEvent& gesture = |
| static_cast<const ui::GestureEvent&>(event); |
| - if (gesture.details().touch_points() >= 4) |
| - return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P; |
| + if (gesture.details().touch_points() == 1) |
| + return UMA_ET_GESTURE_MULTIFINGER_SWIPE_1; |
| + else if (gesture.details().touch_points() == 2) |
| + return UMA_ET_GESTURE_MULTIFINGER_SWIPE_2; |
| else if (gesture.details().touch_points() == 3) |
| return UMA_ET_GESTURE_MULTIFINGER_SWIPE_3; |
| - return UMA_ET_GESTURE_MULTIFINGER_SWIPE; |
| + return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P; |
| } |
| case ui::ET_GESTURE_WIN8_EDGE_SWIPE: |
| return UMA_ET_GESTURE_WIN8_EDGE_SWIPE; |