| 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_USER_METRICS_RECORDER_H_ | 5 #ifndef ASH_USER_METRICS_RECORDER_H_ |
| 6 #define ASH_USER_METRICS_RECORDER_H_ | 6 #define ASH_USER_METRICS_RECORDER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Thumbnail sized overview of windows triggered by pressing the overview key. | 103 // Thumbnail sized overview of windows triggered by pressing the overview key. |
| 104 UMA_WINDOW_OVERVIEW, | 104 UMA_WINDOW_OVERVIEW, |
| 105 | 105 |
| 106 // Selecting a window in overview mode by pressing the enter key. | 106 // Selecting a window in overview mode by pressing the enter key. |
| 107 UMA_WINDOW_OVERVIEW_ENTER_KEY, | 107 UMA_WINDOW_OVERVIEW_ENTER_KEY, |
| 108 | 108 |
| 109 // Window selection started by beginning an alt+tab cycle. This does not count | 109 // Window selection started by beginning an alt+tab cycle. This does not count |
| 110 // each step through an alt+tab cycle. | 110 // each step through an alt+tab cycle. |
| 111 UMA_WINDOW_CYCLE, | 111 UMA_WINDOW_CYCLE, |
| 112 |
| 113 // Reboot action triggered by the user |
| 114 UMA_ACCEL_RESTART_POWER_BUTTON, |
| 112 }; | 115 }; |
| 113 | 116 |
| 114 // User Metrics Recorder provides a repeating callback (RecordPeriodicMetrics) | 117 // User Metrics Recorder provides a repeating callback (RecordPeriodicMetrics) |
| 115 // on a timer to allow recording of state data over time to the UMA records. | 118 // on a timer to allow recording of state data over time to the UMA records. |
| 116 // Any additional states (in ash) that require monitoring can be added to | 119 // Any additional states (in ash) that require monitoring can be added to |
| 117 // this class. As well calls to record on action metrics | 120 // this class. As well calls to record on action metrics |
| 118 // (RecordUserMetricsAction) are passed through the UserMetricsRecorder. | 121 // (RecordUserMetricsAction) are passed through the UserMetricsRecorder. |
| 119 class ASH_EXPORT UserMetricsRecorder { | 122 class ASH_EXPORT UserMetricsRecorder { |
| 120 public: | 123 public: |
| 121 UserMetricsRecorder(); | 124 UserMetricsRecorder(); |
| 122 ~UserMetricsRecorder(); | 125 ~UserMetricsRecorder(); |
| 123 | 126 |
| 124 void RecordUserMetricsAction(ash::UserMetricsAction action); | 127 void RecordUserMetricsAction(ash::UserMetricsAction action); |
| 125 private: | 128 private: |
| 126 void RecordPeriodicMetrics(); | 129 void RecordPeriodicMetrics(); |
| 127 | 130 |
| 128 base::RepeatingTimer<UserMetricsRecorder> timer_; | 131 base::RepeatingTimer<UserMetricsRecorder> timer_; |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace ash | 134 } // namespace ash |
| 132 | 135 |
| 133 #endif // ASH_USER_METRICS_RECORDER_H_ | 136 #endif // ASH_USER_METRICS_RECORDER_H_ |
| OLD | NEW |