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

Side by Side Diff: ash/wm/overview/window_selector_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 unified diff | Download patch
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/overview/window_selector_controller.h" 5 #include "ash/wm/overview/window_selector_controller.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 // TODO(nsatragno): Make WindowSelectorController observe the activation of 62 // TODO(nsatragno): Make WindowSelectorController observe the activation of
63 // windows, so we can remove WindowSelectorDelegate. 63 // windows, so we can remove WindowSelectorDelegate.
64 void WindowSelectorController::OnSelectionEnded() { 64 void WindowSelectorController::OnSelectionEnded() {
65 window_selector_.reset(); 65 window_selector_.reset();
66 last_selection_time_ = base::Time::Now(); 66 last_selection_time_ = base::Time::Now();
67 } 67 }
68 68
69 void WindowSelectorController::OnSelectionStarted() { 69 void WindowSelectorController::OnSelectionStarted() {
70 Shell* shell = Shell::GetInstance();
71 shell->metrics()->RecordUserMetricsAction(UMA_WINDOW_SELECTION);
72 if (!last_selection_time_.is_null()) { 70 if (!last_selection_time_.is_null()) {
73 UMA_HISTOGRAM_LONG_TIMES( 71 UMA_HISTOGRAM_LONG_TIMES(
74 "Ash.WindowSelector.TimeBetweenUse", 72 "Ash.WindowSelector.TimeBetweenUse",
75 base::Time::Now() - last_selection_time_); 73 base::Time::Now() - last_selection_time_);
76 } 74 }
77 } 75 }
78 76
79 } // namespace ash 77 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698