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

Unified Diff: ash/common/wm/overview/window_selector.cc

Issue 2096853002: [ash-md] Adds UMA depth count for Overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698