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

Unified Diff: ash/wm/window_cycle_controller.cc

Issue 320303002: Added UMA stats to overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed last nits. Created 6 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 | « ash/wm/window_cycle_controller.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
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 472a83d76094628eedaec3b087c104875dcb4921..54e702ceb34b4ea4e0180e8b3420a0975614a0e5 100644
--- a/ash/wm/window_cycle_controller.cc
+++ b/ash/wm/window_cycle_controller.cc
@@ -8,6 +8,7 @@
#include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/window_cycle_list.h"
+#include "base/metrics/histogram.h"
#include "ui/events/event.h"
#include "ui/events/event_handler.h"
@@ -79,6 +80,8 @@ void WindowCycleController::StartCycling() {
window_cycle_list_.reset(new WindowCycleList(ash::Shell::GetInstance()->
mru_window_tracker()->BuildMruWindowList()));
event_handler_.reset(new WindowCycleEventFilter());
+ cycle_start_time_ = base::Time::Now();
+ Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_WINDOW_CYCLE);
}
//////////////////////////////////////////////////////////////////////////////
@@ -93,6 +96,8 @@ void WindowCycleController::StopCycling() {
window_cycle_list_.reset();
// Remove our key event filter.
event_handler_.reset();
+ UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowCycleController.CycleTime",
+ base::Time::Now() - cycle_start_time_);
}
} // namespace ash
« no previous file with comments | « ash/wm/window_cycle_controller.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698