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

Unified Diff: ash/wm/overview/window_overview.cc

Issue 24096024: Add UMA metrics for window selection and overview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve the wording of histogram descriptions and fix selection uma count. Created 7 years, 3 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 | « ash/wm/overview/window_overview.h ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_overview.cc
diff --git a/ash/wm/overview/window_overview.cc b/ash/wm/overview/window_overview.cc
index 5674d3e840711d71313d96fe65b136e7c07c4973..d4c896d9b31fdb4718ccd1d69c0702b308d19e3c 100644
--- a/ash/wm/overview/window_overview.cc
+++ b/ash/wm/overview/window_overview.cc
@@ -8,9 +8,11 @@
#include "ash/screen_ash.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/overview/window_selector.h"
#include "ash/wm/overview/window_selector_item.h"
+#include "base/metrics/histogram.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
@@ -51,13 +53,19 @@ WindowOverview::WindowOverview(WindowSelector* window_selector,
aura::RootWindow* single_root_window)
: window_selector_(window_selector),
windows_(windows),
- single_root_window_(single_root_window) {
+ single_root_window_(single_root_window),
+ overview_start_time_(base::Time::Now()) {
PositionWindows();
ash::Shell::GetInstance()->AddPreTargetHandler(this);
+ Shell* shell = Shell::GetInstance();
+ shell->delegate()->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW);
}
WindowOverview::~WindowOverview() {
ash::Shell::GetInstance()->RemovePreTargetHandler(this);
+ UMA_HISTOGRAM_MEDIUM_TIMES(
+ "Ash.WindowSelector.TimeInOverview",
+ base::Time::Now() - overview_start_time_);
}
void WindowOverview::SetSelection(size_t index) {
« no previous file with comments | « ash/wm/overview/window_overview.h ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698