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> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ash/common/metrics/user_metrics_action.h" | 11 #include "ash/common/metrics/user_metrics_action.h" |
12 #include "ash/metrics/task_switch_metrics_recorder.h" | 12 #include "ash/metrics/task_switch_metrics_recorder.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
18 class DesktopTaskSwitchMetricRecorder; | 18 class DesktopTaskSwitchMetricRecorder; |
19 | 19 |
20 #if defined(OS_CHROMEOS) | |
21 class PointerMetricsRecorder; | |
22 #endif | |
23 | |
20 namespace test { | 24 namespace test { |
21 class UserMetricsRecorderTestAPI; | 25 class UserMetricsRecorderTestAPI; |
22 } | 26 } |
23 | 27 |
24 // User Metrics Recorder provides a repeating callback (RecordPeriodicMetrics) | 28 // User Metrics Recorder provides a repeating callback (RecordPeriodicMetrics) |
25 // on a timer to allow recording of state data over time to the UMA records. | 29 // on a timer to allow recording of state data over time to the UMA records. |
26 // Any additional states (in ash) that require monitoring can be added to | 30 // Any additional states (in ash) that require monitoring can be added to |
27 // this class. As well calls to record on action metrics | 31 // this class. As well calls to record on action metrics |
28 // (RecordUserMetricsAction) are passed through the UserMetricsRecorder. | 32 // (RecordUserMetricsAction) are passed through the UserMetricsRecorder. |
29 class ASH_EXPORT UserMetricsRecorder { | 33 class ASH_EXPORT UserMetricsRecorder { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 // The periodic timer that triggers metrics to be recorded. | 75 // The periodic timer that triggers metrics to be recorded. |
72 base::RepeatingTimer timer_; | 76 base::RepeatingTimer timer_; |
73 | 77 |
74 TaskSwitchMetricsRecorder task_switch_metrics_recorder_; | 78 TaskSwitchMetricsRecorder task_switch_metrics_recorder_; |
75 | 79 |
76 // Metric recorder to track how often task windows are activated by mouse | 80 // Metric recorder to track how often task windows are activated by mouse |
77 // clicks or touchscreen taps. | 81 // clicks or touchscreen taps. |
78 std::unique_ptr<DesktopTaskSwitchMetricRecorder> | 82 std::unique_ptr<DesktopTaskSwitchMetricRecorder> |
79 desktop_task_switch_metric_recorder_; | 83 desktop_task_switch_metric_recorder_; |
80 | 84 |
85 #if defined(OS_CHROMEOS) | |
86 // Metric recorder to track pointer down event. | |
Daniel Erat
2016/09/27 19:15:10
nit: s/event/events/
xiaoyinh(OOO Sep 11-29)
2016/09/29 20:37:43
Done.
| |
87 std::unique_ptr<PointerMetricsRecorder> pointer_metrics_recorder_; | |
88 #endif | |
89 | |
81 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); | 90 DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); |
82 }; | 91 }; |
83 | 92 |
84 } // namespace ash | 93 } // namespace ash |
85 | 94 |
86 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ | 95 #endif // ASH_METRICS_USER_METRICS_RECORDER_H_ |
OLD | NEW |