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

Side by Side Diff: ash/metrics/user_metrics_recorder.h

Issue 776093004: Add device policy to disallow shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modifications suggested by stevenjb Created 6 years 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 | « no previous file | ash/metrics/user_metrics_recorder.cc » ('j') | ash/wm/lock_state_controller.cc » ('J')
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 #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
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_
OLDNEW
« no previous file with comments | « no previous file | ash/metrics/user_metrics_recorder.cc » ('j') | ash/wm/lock_state_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698