OLD | NEW |
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 #ifndef ASH_METRICS_USER_METRICS_RECORDER_H_ | 5 #ifndef ASH_METRICS_USER_METRICS_RECORDER_H_ |
6 #define ASH_METRICS_USER_METRICS_RECORDER_H_ | 6 #define ASH_METRICS_USER_METRICS_RECORDER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/metrics/task_switch_metrics_recorder.h" |
9 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
10 | 11 |
11 namespace ash { | 12 namespace ash { |
12 | 13 |
13 namespace test { | 14 namespace test { |
14 class UserMetricsRecorderTestAPI; | 15 class UserMetricsRecorderTestAPI; |
15 } | 16 } |
16 | 17 |
17 enum UserMetricsAction { | 18 enum UserMetricsAction { |
18 UMA_ACCEL_EXIT_FIRST_Q, | 19 UMA_ACCEL_EXIT_FIRST_Q, |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Returns true if the user's session is active and they are in a desktop | 162 // Returns true if the user's session is active and they are in a desktop |
162 // environment. | 163 // environment. |
163 bool IsUserInActiveDesktopEnvironment() const; | 164 bool IsUserInActiveDesktopEnvironment() const; |
164 | 165 |
165 // Starts the |timer_| and binds it to |RecordPeriodicMetrics|. | 166 // Starts the |timer_| and binds it to |RecordPeriodicMetrics|. |
166 void StartTimer(); | 167 void StartTimer(); |
167 | 168 |
168 // The periodic timer that triggers metrics to be recorded. | 169 // The periodic timer that triggers metrics to be recorded. |
169 base::RepeatingTimer<UserMetricsRecorder> timer_; | 170 base::RepeatingTimer<UserMetricsRecorder> timer_; |
170 | 171 |
| 172 TaskSwitchMetricsRecorder task_switch_metrics_recorder_; |
| 173 |
171 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); | 174 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); |
172 }; | 175 }; |
173 | 176 |
174 } // namespace ash | 177 } // namespace ash |
175 | 178 |
176 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ | 179 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ |
OLD | NEW |