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 <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "ash/metrics/task_switch_metrics_recorder.h" | 11 #include "ash/metrics/task_switch_metrics_recorder.h" |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
13 | 14 |
14 namespace ash { | 15 namespace ash { |
15 | 16 |
16 class DesktopTaskSwitchMetricRecorder; | 17 class DesktopTaskSwitchMetricRecorder; |
17 | 18 |
18 namespace test { | 19 namespace test { |
19 class UserMetricsRecorderTestAPI; | 20 class UserMetricsRecorderTestAPI; |
20 } | 21 } |
21 | 22 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Starts the |timer_| and binds it to |RecordPeriodicMetrics|. | 187 // Starts the |timer_| and binds it to |RecordPeriodicMetrics|. |
187 void StartTimer(); | 188 void StartTimer(); |
188 | 189 |
189 // The periodic timer that triggers metrics to be recorded. | 190 // The periodic timer that triggers metrics to be recorded. |
190 base::RepeatingTimer timer_; | 191 base::RepeatingTimer timer_; |
191 | 192 |
192 TaskSwitchMetricsRecorder task_switch_metrics_recorder_; | 193 TaskSwitchMetricsRecorder task_switch_metrics_recorder_; |
193 | 194 |
194 // Metric recorder to track how often task windows are activated by mouse | 195 // Metric recorder to track how often task windows are activated by mouse |
195 // clicks or touchscreen taps. | 196 // clicks or touchscreen taps. |
196 scoped_ptr<DesktopTaskSwitchMetricRecorder> | 197 std::unique_ptr<DesktopTaskSwitchMetricRecorder> |
197 desktop_task_switch_metric_recorder_; | 198 desktop_task_switch_metric_recorder_; |
198 | 199 |
199 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); | 200 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); |
200 }; | 201 }; |
201 | 202 |
202 } // namespace ash | 203 } // namespace ash |
203 | 204 |
204 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ | 205 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ |
OLD | NEW |