Skip to content

Commit 7b08318

Browse files
author
Alex Newcomer
committed
cros: Fix UMA bug for launcher transitions
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. TBR=newcomer@chromium.org (cherry picked from commit 1c98086) Bug: 761188 Change-Id: Ia658cac79326678b5e011aca2b1670b6b868e977 Reviewed-on: https://chromium-review.googlesource.com/646762 Commit-Queue: Alex Newcomer <newcomer@chromium.org> Reviewed-by: Mark Pearson <mpearson@chromium.org> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#499349} Reviewed-on: https://chromium-review.googlesource.com/655621 Reviewed-by: Alex Newcomer <newcomer@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#66} Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
1 parent 3fef18a commit 7b08318

4 files changed

Lines changed: 25 additions & 5 deletions

File tree

tools/metrics/histograms/enums.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36770,6 +36770,11 @@ from previous Chrome versions.
3677036770
<int value="2" label="Load failed"/>
3677136771
</enum>
3677236772

36773+
<enum name="SuggestedAppListAppLaunched">
36774+
<int value="0" label="Not a suggested app"/>
36775+
<int value="1" label="Suggested app"/>
36776+
</enum>
36777+
3677336778
<!--
3677436779
These values are based on the server-side type AnswerTriggererKey. Note that not
3677536780
all of the types are launched in Chrome but if they're sent erroneously, it

tools/metrics/histograms/histograms.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,15 +1642,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
16421642
<summary>Interactions with the App Launcher promo dialog.</summary>
16431643
</histogram>
16441644

1645-
<histogram name="Apps.AppListAppLaunched" enum="BooleanEnabled">
1645+
<histogram name="Apps.AppListAppLaunched" enum="SuggestedAppListAppLaunched">
16461646
<owner>newcomer@chromium.org</owner>
16471647
<summary>
16481648
The number of apps launched from the launcher. This is logged each time an
1649-
app is launched. The bucket denotes whether the app is suggested.
1649+
app is launched.
16501650
</summary>
16511651
</histogram>
16521652

1653-
<histogram name="Apps.AppListAppLaunchedFullscreen" enum="BooleanEnabled">
1653+
<histogram name="Apps.AppListAppLaunchedFullscreen"
1654+
enum="SuggestedAppListAppLaunched">
16541655
<owner>newcomer@chromium.org</owner>
16551656
<summary>
16561657
The number of apps launched from the fullscreen launcher. This is logged
@@ -1710,6 +1711,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
17101711
</summary>
17111712
</histogram>
17121713

1714+
<histogram name="Apps.AppListPeekingToFullscreen"
1715+
enum="AppListPeekingToFullscreenSource">
1716+
<owner/>
1717+
<summary>
1718+
Replaced with Apps.AppListPeekingToFullscreenSource on 9/2017.
1719+
</summary>
1720+
</histogram>
1721+
17131722
<histogram name="Apps.AppListPeekingToFullscreenSource"
17141723
enum="AppListPeekingToFullscreenSource">
17151724
<owner>newcomer@chromium.org</owner>

ui/app_list/app_list_constants.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const char kAppListFolderOpenedHistogram[] = "Apps.AppListFolderOpened";
206206
// The UMA histogram that logs how the app list transitions from peeking to
207207
// fullscreen.
208208
const char kAppListPeekingToFullscreenHistogram[] =
209-
"Apps.AppListPeekingToFullscreen";
209+
"Apps.AppListPeekingToFullscreenSource";
210210

211211
// The UMA histogram that logs how the app list is shown.
212212
const char kAppListToggleMethodHistogram[] = "Apps.AppListShowSource";

ui/app_list/views/app_list_view.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,13 @@ void AppListView::EndDrag(const gfx::Point& location) {
714714
break;
715715
case PEEKING:
716716
if (std::abs(drag_delta) > app_list_threshold) {
717-
SetState(drag_delta > 0 ? FULLSCREEN_ALL_APPS : CLOSED);
717+
if (drag_delta > 0) {
718+
SetState(FULLSCREEN_ALL_APPS);
719+
UMA_HISTOGRAM_ENUMERATION(kAppListPeekingToFullscreenHistogram,
720+
kSwipe, kMaxPeekingToFullscreen);
721+
} else {
722+
SetState(CLOSED);
723+
}
718724
} else {
719725
SetState(app_list_state_);
720726
}

0 commit comments

Comments
 (0)