Commit 4428e271 authored by MinChen's avatar MinChen Committed by Commit Bot

Record user actions for swiping on IME/ SystemTray/ Palette/ Notifications.

Bug: 725977
Change-Id: Ia44202d2c6f316fa76c32dc3d1f56f0a4b15dc68
Reviewed-on: https://chromium-review.googlesource.com/575583
Commit-Queue: min c <minch@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarTerry Anderson <tdanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488798}
parent b9cff12b
...@@ -108,6 +108,10 @@ enum UserMetricsAction { ...@@ -108,6 +108,10 @@ enum UserMetricsAction {
UMA_TRAY_OVERVIEW, UMA_TRAY_OVERVIEW,
UMA_TRAY_SETTINGS, UMA_TRAY_SETTINGS,
UMA_TRAY_SHUT_DOWN, UMA_TRAY_SHUT_DOWN,
UMA_TRAY_SWIPE_TO_CLOSE_SUCCESSFUL,
UMA_TRAY_SWIPE_TO_CLOSE_UNSUCCESSFUL,
UMA_TRAY_SWIPE_TO_OPEN_SUCCESSFUL,
UMA_TRAY_SWIPE_TO_OPEN_UNSUCCESSFUL,
UMA_WINDOW_APP_CLOSE_BUTTON_CLICK, UMA_WINDOW_APP_CLOSE_BUTTON_CLICK,
UMA_WINDOW_CLOSE_BUTTON_CLICK, UMA_WINDOW_CLOSE_BUTTON_CLICK,
UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN, UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN,
......
...@@ -477,6 +477,18 @@ void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) { ...@@ -477,6 +477,18 @@ void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) {
case UMA_TRAY_SHUT_DOWN: case UMA_TRAY_SHUT_DOWN:
RecordAction(UserMetricsAction("Tray_ShutDown")); RecordAction(UserMetricsAction("Tray_ShutDown"));
break; break;
case UMA_TRAY_SWIPE_TO_CLOSE_SUCCESSFUL:
RecordAction(UserMetricsAction("Tray_SwipeToClose_Successful"));
break;
case UMA_TRAY_SWIPE_TO_CLOSE_UNSUCCESSFUL:
RecordAction(UserMetricsAction("Tray_SwipeToClose_Unsuccessful"));
break;
case UMA_TRAY_SWIPE_TO_OPEN_SUCCESSFUL:
RecordAction(UserMetricsAction("Tray_SwipeToOpen_Successful"));
break;
case UMA_TRAY_SWIPE_TO_OPEN_UNSUCCESSFUL:
RecordAction(UserMetricsAction("Tray_SwipeToOpen_Unsuccessful"));
break;
case UMA_WINDOW_APP_CLOSE_BUTTON_CLICK: case UMA_WINDOW_APP_CLOSE_BUTTON_CLICK:
RecordAction(UserMetricsAction("AppCloseButton_Clk")); RecordAction(UserMetricsAction("AppCloseButton_Clk"));
break; break;
......
...@@ -97,6 +97,17 @@ void TrayDragController::CompleteGestureDrag(const ui::GestureEvent& gesture) { ...@@ -97,6 +97,17 @@ void TrayDragController::CompleteGestureDrag(const ui::GestureEvent& gesture) {
tray_view_->AnimateToTargetBounds(target_bounds, hide_bubble); tray_view_->AnimateToTargetBounds(target_bounds, hide_bubble);
is_in_drag_ = false; is_in_drag_ = false;
UserMetricsRecorder* metrics = Shell::Get()->metrics();
if (is_on_bubble_) {
metrics->RecordUserMetricsAction(
hide_bubble ? UMA_TRAY_SWIPE_TO_CLOSE_SUCCESSFUL
: UMA_TRAY_SWIPE_TO_CLOSE_UNSUCCESSFUL);
} else {
metrics->RecordUserMetricsAction(hide_bubble
? UMA_TRAY_SWIPE_TO_OPEN_UNSUCCESSFUL
: UMA_TRAY_SWIPE_TO_OPEN_SUCCESSFUL);
}
} }
void TrayDragController::UpdateBubbleBounds() { void TrayDragController::UpdateBubbleBounds() {
......
...@@ -17399,6 +17399,46 @@ should be able to be added at any place in this file. ...@@ -17399,6 +17399,46 @@ should be able to be added at any place in this file.
<description>Please enter the description of this user action.</description> <description>Please enter the description of this user action.</description>
</action> </action>
<action name="Tray_SwipeToClose_Successful">
<owner>omrilio@chromium.org</owner>
<owner>minch@chromium.org</owner>
<description>
Records when the user swipes on the tray bubble (ImeTrayBubble,
SystemTrayBubble, WebNotificationTrayBubble, PaletteTrayBubble) in an
attempt to close it and succeeded ultimately.
</description>
</action>
<action name="Tray_SwipeToClose_Unsuccessful">
<owner>omrilio@chromium.org</owner>
<owner>minch@chromium.org</owner>
<description>
Records when the user swipes on the status area tray bubble (ImeTrayBubble,
SystemTrayBubble, WebNotificationBubble, PaletteTrayBubble) in an attempt to
close it but failed ultimately.
</description>
</action>
<action name="Tray_SwipeToOpen_Successful">
<owner>omrilio@chromium.org</owner>
<owner>minch@chromium.org</owner>
<description>
Records when the user swipes on the status area tray (ImeTray, SystemTray,
WebNotificationTray, PaletteTray) in an attempt to open the associated
bubble and succeeded ultimately.
</description>
</action>
<action name="Tray_SwipeToOpen_Unsuccessful">
<owner>omrilio@chromium.org</owner>
<owner>minch@chromium.org</owner>
<description>
Records when the user swipes on the status area tray (ImeTray, SystemTray,
WebNotificationTray, PaletteTray) in an attempt to open the associated
bubble but failed ultimately.
</description>
</action>
<action name="Underline"> <action name="Underline">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description> <description>Please enter the description of this user action.</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment