Skip to content

Commit

Permalink
cros: Fix UMA bug for launcher transitions
Browse files Browse the repository at this point in the history
Non-fling PEEKING->FULLSCREEN_ALL_APPS was not being
recorded in UMA.

Also, at the request of PMs, I modified the histogram description for
Apps.AppListAppLaunched.

[email protected]

(cherry picked from commit 1c98086)

Bug: 761188
Change-Id: Ia658cac79326678b5e011aca2b1670b6b868e977
Reviewed-on: https://chromium-review.googlesource.com/646762
Commit-Queue: Alex Newcomer <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Xiyuan Xia <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#499349}
Reviewed-on: https://chromium-review.googlesource.com/655621
Reviewed-by: Alex Newcomer <[email protected]>
Cr-Commit-Position: refs/branch-heads/3202@{#66}
Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
  • Loading branch information
Alex Newcomer committed Sep 7, 2017
1 parent 3fef18a commit 7b08318
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
5 changes: 5 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36770,6 +36770,11 @@ from previous Chrome versions.
<int value="2" label="Load failed"/>
</enum>

<enum name="SuggestedAppListAppLaunched">
<int value="0" label="Not a suggested app"/>
<int value="1" label="Suggested app"/>
</enum>

<!--
These values are based on the server-side type AnswerTriggererKey. Note that not
all of the types are launched in Chrome but if they're sent erroneously, it
Expand Down
15 changes: 12 additions & 3 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1642,15 +1642,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary>Interactions with the App Launcher promo dialog.</summary>
</histogram>

<histogram name="Apps.AppListAppLaunched" enum="BooleanEnabled">
<histogram name="Apps.AppListAppLaunched" enum="SuggestedAppListAppLaunched">
<owner>[email protected]</owner>
<summary>
The number of apps launched from the launcher. This is logged each time an
app is launched. The bucket denotes whether the app is suggested.
app is launched.
</summary>
</histogram>

<histogram name="Apps.AppListAppLaunchedFullscreen" enum="BooleanEnabled">
<histogram name="Apps.AppListAppLaunchedFullscreen"
enum="SuggestedAppListAppLaunched">
<owner>[email protected]</owner>
<summary>
The number of apps launched from the fullscreen launcher. This is logged
Expand Down Expand Up @@ -1710,6 +1711,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>

<histogram name="Apps.AppListPeekingToFullscreen"
enum="AppListPeekingToFullscreenSource">
<owner/>
<summary>
Replaced with Apps.AppListPeekingToFullscreenSource on 9/2017.
</summary>
</histogram>

<histogram name="Apps.AppListPeekingToFullscreenSource"
enum="AppListPeekingToFullscreenSource">
<owner>[email protected]</owner>
Expand Down
2 changes: 1 addition & 1 deletion ui/app_list/app_list_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const char kAppListFolderOpenedHistogram[] = "Apps.AppListFolderOpened";
// The UMA histogram that logs how the app list transitions from peeking to
// fullscreen.
const char kAppListPeekingToFullscreenHistogram[] =
"Apps.AppListPeekingToFullscreen";
"Apps.AppListPeekingToFullscreenSource";

// The UMA histogram that logs how the app list is shown.
const char kAppListToggleMethodHistogram[] = "Apps.AppListShowSource";
Expand Down
8 changes: 7 additions & 1 deletion ui/app_list/views/app_list_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,13 @@ void AppListView::EndDrag(const gfx::Point& location) {
break;
case PEEKING:
if (std::abs(drag_delta) > app_list_threshold) {
SetState(drag_delta > 0 ? FULLSCREEN_ALL_APPS : CLOSED);
if (drag_delta > 0) {
SetState(FULLSCREEN_ALL_APPS);
UMA_HISTOGRAM_ENUMERATION(kAppListPeekingToFullscreenHistogram,
kSwipe, kMaxPeekingToFullscreen);
} else {
SetState(CLOSED);
}
} else {
SetState(app_list_state_);
}
Expand Down

0 comments on commit 7b08318

Please sign in to comment.