Commit eaab593f authored by David Black's avatar David Black Committed by Commit Bot

Record more holding space pod actions.

New actions include:
- kShowContextMenu
- kShowPreviews
- kHidePreviews

This should tell us how discoverable the holding space pod context menu
is and how often users are enabling/disabling previews.

Bug: 1131266
Change-Id: I2b3d8c02afd6167ee1b516780ac29669e8566b4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531495
Commit-Queue: David Black <dmblack@google.com>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826419}
parent d631e0e4
...@@ -26,7 +26,10 @@ enum class PodAction { ...@@ -26,7 +26,10 @@ enum class PodAction {
// kClick (Deprecated) = 0, // kClick (Deprecated) = 0,
kShow = 1, kShow = 1,
kClose = 2, kClose = 2,
kMaxValue = kClose, kShowContextMenu = 3,
kShowPreviews = 4,
kHidePreviews = 5,
kMaxValue = kHidePreviews,
}; };
// Records the specified `action` taken on the holding space pod in the shelf. // Records the specified `action` taken on the holding space pod in the shelf.
......
...@@ -204,10 +204,16 @@ void HoldingSpaceTray::ExecuteCommand(int command_id, int event_flags) { ...@@ -204,10 +204,16 @@ void HoldingSpaceTray::ExecuteCommand(int command_id, int event_flags) {
DCHECK(features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled()); DCHECK(features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled());
switch (command_id) { switch (command_id) {
case HoldingSpaceCommandId::kHidePreviews: case HoldingSpaceCommandId::kHidePreviews:
holding_space_metrics::RecordPodAction(
holding_space_metrics::PodAction::kHidePreviews);
holding_space_prefs::SetPreviewsEnabled( holding_space_prefs::SetPreviewsEnabled(
Shell::Get()->session_controller()->GetActivePrefService(), false); Shell::Get()->session_controller()->GetActivePrefService(), false);
break; break;
case HoldingSpaceCommandId::kShowPreviews: case HoldingSpaceCommandId::kShowPreviews:
holding_space_metrics::RecordPodAction(
holding_space_metrics::PodAction::kShowPreviews);
holding_space_prefs::SetPreviewsEnabled( holding_space_prefs::SetPreviewsEnabled(
Shell::Get()->session_controller()->GetActivePrefService(), true); Shell::Get()->session_controller()->GetActivePrefService(), true);
break; break;
...@@ -223,6 +229,9 @@ void HoldingSpaceTray::ShowContextMenuForViewImpl( ...@@ -223,6 +229,9 @@ void HoldingSpaceTray::ShowContextMenuForViewImpl(
ui::MenuSourceType source_type) { ui::MenuSourceType source_type) {
DCHECK(features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled()); DCHECK(features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled());
holding_space_metrics::RecordPodAction(
holding_space_metrics::PodAction::kShowContextMenu);
context_menu_model_ = std::make_unique<ui::SimpleMenuModel>(this); context_menu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
const bool previews_enabled = holding_space_prefs::IsPreviewsEnabled( const bool previews_enabled = holding_space_prefs::IsPreviewsEnabled(
......
...@@ -36278,6 +36278,9 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> ...@@ -36278,6 +36278,9 @@ Called by update_gpu_driver_bug_workaround_entries.py.-->
<int value="0" label="kClick (Deprecated)"/> <int value="0" label="kClick (Deprecated)"/>
<int value="1" label="kShow"/> <int value="1" label="kShow"/>
<int value="2" label="kClose"/> <int value="2" label="kClose"/>
<int value="3" label="kShowContextMenu"/>
<int value="4" label="kShowPreviews"/>
<int value="5" label="kHidePreviews"/>
</enum> </enum>
<enum name="HomeButtonPreferenceStateType"> <enum name="HomeButtonPreferenceStateType">
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