Index: ash/common/wm/overview/window_selector.cc |
diff --git a/ash/common/wm/overview/window_selector.cc b/ash/common/wm/overview/window_selector.cc |
index 3d79eb23d4d7415c005a8ef290b9bf74ad7f4acd..28665fe26077b073c119ea3eccc9e6d3b40d6b57 100644 |
--- a/ash/common/wm/overview/window_selector.cc |
+++ b/ash/common/wm/overview/window_selector.cc |
@@ -460,9 +460,16 @@ void WindowSelector::SelectWindow(WmWindow* window) { |
// mode (i.e., the window at the front of the MRU list). |
std::vector<WmWindow*> window_list = |
WmShell::Get()->GetMruWindowTracker()->BuildMruWindowList(); |
- if (!window_list.empty() && window_list[0] != window) { |
- WmShell::Get()->RecordUserMetricsAction( |
- UMA_WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED); |
+ if (!window_list.empty()) { |
+ if (window_list[0] != window) { |
+ WmShell::Get()->RecordUserMetricsAction( |
+ UMA_WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED); |
+ } |
+ const auto it = std::find(window_list.begin(), window_list.end(), window); |
+ if (it != window_list.end()) { |
+ UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.SelectionDepth", |
+ it - window_list.begin()); |
+ } |
} |
window->GetWindowState()->Activate(); |