| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // . When you want the version invoke: loader.GetBootTimes(&consumer, callback); | 25 // . When you want the version invoke: loader.GetBootTimes(&consumer, callback); |
| 26 class BootTimesLoader : public CancelableRequestProvider { | 26 class BootTimesLoader : public CancelableRequestProvider { |
| 27 public: | 27 public: |
| 28 BootTimesLoader(); | 28 BootTimesLoader(); |
| 29 | 29 |
| 30 // All fields are 0.0 if they couldn't be found. | 30 // All fields are 0.0 if they couldn't be found. |
| 31 typedef struct BootTimes { | 31 typedef struct BootTimes { |
| 32 double firmware; // Time from power button to kernel being loaded. | 32 double firmware; // Time from power button to kernel being loaded. |
| 33 double pre_startup; // Time from kernel to system code being called. | 33 double pre_startup; // Time from kernel to system code being called. |
| 34 double x_started; // Time X server is ready to be connected to. | 34 double x_started; // Time X server is ready to be connected to. |
| 35 double chrome_exec; // Time session manager executed Chrome. |
| 36 double chrome_main; // Time chrome's main() was called. |
| 35 double login_prompt_ready; // Time login (or OOB) panel is displayed. | 37 double login_prompt_ready; // Time login (or OOB) panel is displayed. |
| 36 | 38 |
| 37 BootTimes() : firmware(0), | 39 BootTimes() : firmware(0), |
| 38 pre_startup(0), | 40 pre_startup(0), |
| 39 x_started(0), | 41 x_started(0), |
| 42 chrome_exec(0), |
| 43 chrome_main(0), |
| 40 login_prompt_ready(0) {} | 44 login_prompt_ready(0) {} |
| 41 } BootTimes; | 45 } BootTimes; |
| 42 | 46 |
| 43 // Signature | 47 // Signature |
| 44 typedef Callback2<Handle, BootTimes>::Type GetBootTimesCallback; | 48 typedef Callback2<Handle, BootTimes>::Type GetBootTimesCallback; |
| 45 | 49 |
| 46 typedef CancelableRequest<GetBootTimesCallback> GetBootTimesRequest; | 50 typedef CancelableRequest<GetBootTimesCallback> GetBootTimesRequest; |
| 47 | 51 |
| 48 // Asynchronously requests the info. | 52 // Asynchronously requests the info. |
| 49 Handle GetBootTimes( | 53 Handle GetBootTimes( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 scoped_refptr<Backend> backend_; | 74 scoped_refptr<Backend> backend_; |
| 71 | 75 |
| 72 DISALLOW_COPY_AND_ASSIGN(BootTimesLoader); | 76 DISALLOW_COPY_AND_ASSIGN(BootTimesLoader); |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 } // namespace chromeos | 79 } // namespace chromeos |
| 76 | 80 |
| 77 #endif // CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ | 81 #endif // CHROME_BROWSER_CHROMEOS_BOOT_TIMES_LOADER_H_ |
| OLD | NEW |