| 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 COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 5 #ifndef COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
| 6 #define COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 6 #define COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // In Mojo, the entry point time is the time at which the shell starts. | 71 // In Mojo, the entry point time is the time at which the shell starts. |
| 72 void RecordMainEntryPointTime(const base::Time& time); | 72 void RecordMainEntryPointTime(const base::Time& time); |
| 73 | 73 |
| 74 // Call this with the time when the executable is loaded and main() is entered. | 74 // Call this with the time when the executable is loaded and main() is entered. |
| 75 // Can be different from |RecordMainEntryPointTime| when the startup process is | 75 // Can be different from |RecordMainEntryPointTime| when the startup process is |
| 76 // contained in a separate dll, such as with chrome.exe / chrome.dll on Windows. | 76 // contained in a separate dll, such as with chrome.exe / chrome.dll on Windows. |
| 77 void RecordExeMainEntryPointTime(const base::Time& time); | 77 void RecordExeMainEntryPointTime(const base::Time& time); |
| 78 | 78 |
| 79 // Call this with the time recorded just before the message loop is started. | 79 // Call this with the time recorded just before the message loop is started. |
| 80 // |is_first_run| - is the current launch part of a first run. |pref_service| is | 80 // |is_first_run| - is the current launch part of a first run. |pref_service| is |
| 81 // an optional parameter which, if provided, will be used to store state for | 81 // used to store state for stats that span multiple startups. |
| 82 // stats that span multiple startups; in its absence those stats will not be | |
| 83 // recorded. | |
| 84 void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, | 82 void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, |
| 85 bool is_first_run, | 83 bool is_first_run, |
| 86 PrefService* pref_service); | 84 PrefService* pref_service); |
| 87 | 85 |
| 88 // Call this with the time when the first browser window became visible. | 86 // Call this with the time when the first browser window became visible. |
| 89 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); | 87 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); |
| 90 | 88 |
| 91 // Call this with the time delta that the browser spent opening its tabs. | 89 // Call this with the time delta that the browser spent opening its tabs. |
| 92 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); | 90 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); |
| 93 | 91 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 119 base::TimeTicks MainEntryPointTicks(); | 117 base::TimeTicks MainEntryPointTicks(); |
| 120 | 118 |
| 121 // Returns the startup type. This is only currently supported on the Windows | 119 // Returns the startup type. This is only currently supported on the Windows |
| 122 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. | 120 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. |
| 123 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). | 121 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). |
| 124 StartupTemperature GetStartupTemperature(); | 122 StartupTemperature GetStartupTemperature(); |
| 125 | 123 |
| 126 } // namespace startup_metric_utils | 124 } // namespace startup_metric_utils |
| 127 | 125 |
| 128 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 126 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
| OLD | NEW |