Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: ash/wm/window_cycle_controller.cc

Issue 2096063002: [ash-md] Adds UMA items count and selection depth for Alt+Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Adds UMA items count and selection depth for Alt+Tab (rebased) Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/window_cycle_list.h » ('j') | ash/wm/window_cycle_list.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_cycle_controller.cc
diff --git a/ash/wm/window_cycle_controller.cc b/ash/wm/window_cycle_controller.cc
index 5c37562341272bddc6778831ddfdc6f18b982d5b..201802d5f649cf3de3fefa49714ab737ced7660a 100644
--- a/ash/wm/window_cycle_controller.cc
+++ b/ash/wm/window_cycle_controller.cc
@@ -96,6 +96,8 @@ void WindowCycleController::StartCycling() {
event_handler_.reset(new WindowCycleEventFilter());
cycle_start_time_ = base::Time::Now();
WmShell::Get()->RecordUserMetricsAction(UMA_WINDOW_CYCLE);
+ UMA_HISTOGRAM_COUNTS_100("Ash.WindowCycleController.Items",
+ window_list.size());
}
//////////////////////////////////////////////////////////////////////////////
@@ -107,6 +109,7 @@ void WindowCycleController::Step(Direction direction) {
}
void WindowCycleController::StopCycling() {
+ int depth = window_cycle_list_->current_index();
tdanderson 2016/06/24 19:25:56 nit: no need for a local variable, just inline on
varkha 2016/06/24 19:59:46 |window_cycle_list_| goes away in the next line bu
window_cycle_list_.reset();
WmWindow* active_window_after_window_cycle = GetActiveWindow(
@@ -116,6 +119,8 @@ void WindowCycleController::StopCycling() {
event_handler_.reset();
UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowCycleController.CycleTime",
base::Time::Now() - cycle_start_time_);
+ UMA_HISTOGRAM_COUNTS_100("Ash.WindowCycleController.SelectionDepth",
+ depth + 1);
if (active_window_after_window_cycle != nullptr &&
active_window_before_window_cycle_ != active_window_after_window_cycle) {
« no previous file with comments | « no previous file | ash/wm/window_cycle_list.h » ('j') | ash/wm/window_cycle_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698