OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 // . When you want the version invoke: loader.GetBootTimes(callback, &tracker_); | 34 // . When you want the version invoke: loader.GetBootTimes(callback, &tracker_); |
35 class BootTimesLoader : public content::NotificationObserver, | 35 class BootTimesLoader : public content::NotificationObserver, |
36 public LoginEventRecorder::Delegate { | 36 public LoginEventRecorder::Delegate { |
37 public: | 37 public: |
38 BootTimesLoader(); | 38 BootTimesLoader(); |
39 virtual ~BootTimesLoader(); | 39 virtual ~BootTimesLoader(); |
40 | 40 |
41 static BootTimesLoader* Get(); | 41 static BootTimesLoader* Get(); |
42 | 42 |
43 // LoginEventRecorder::Delegate override. | 43 // LoginEventRecorder::Delegate override. |
44 | |
45 // Add a time marker for login. A timeline will be dumped to | |
46 // /tmp/login-times-sent after login is done. If |send_to_uma| is true | |
47 // the time between this marker and the last will be sent to UMA with | |
48 // the identifier BootTime.|marker_name|. | |
49 virtual void AddLoginTimeMarker(const std::string& marker_name, | 44 virtual void AddLoginTimeMarker(const std::string& marker_name, |
50 bool send_to_uma) OVERRIDE; | 45 bool send_to_uma) OVERRIDE; |
| 46 virtual void RecordAuthenticationSuccess() OVERRIDE; |
| 47 virtual void RecordAuthenticationFailure() OVERRIDE; |
51 | 48 |
52 // Add a time marker for logout. A timeline will be dumped to | 49 // Add a time marker for logout. A timeline will be dumped to |
53 // /tmp/logout-times-sent after logout is done. If |send_to_uma| is true | 50 // /tmp/logout-times-sent after logout is done. If |send_to_uma| is true |
54 // the time between this marker and the last will be sent to UMA with | 51 // the time between this marker and the last will be sent to UMA with |
55 // the identifier ShutdownTime.|marker_name|. | 52 // the identifier ShutdownTime.|marker_name|. |
56 void AddLogoutTimeMarker(const std::string& marker_name, bool send_to_uma); | 53 void AddLogoutTimeMarker(const std::string& marker_name, bool send_to_uma); |
57 | 54 |
58 // Records current uptime and disk usage for metrics use. | 55 // Records current uptime and disk usage for metrics use. |
59 // Posts task to file thread. | 56 // Posts task to file thread. |
60 // name will be used as part of file names in /tmp. | 57 // name will be used as part of file names in /tmp. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 bool login_done_; | 185 bool login_done_; |
189 | 186 |
190 bool restart_requested_; | 187 bool restart_requested_; |
191 | 188 |
192 DISALLOW_COPY_AND_ASSIGN(BootTimesLoader); | 189 DISALLOW_COPY_AND_ASSIGN(BootTimesLoader); |
193 }; | 190 }; |
194 | 191 |
195 } // namespace chromeos | 192 } // namespace chromeos |
196 | 193 |
197 #endif // CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ |
OLD | NEW |