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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, | 82 void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, |
83 bool is_first_run); | 83 bool is_first_run); |
84 | 84 |
85 // Logs the Startup.TimeSinceLastStartup histogram. Obtains the timestamp of the | 85 // Logs the Startup.TimeSinceLastStartup histogram. Obtains the timestamp of the |
86 // last startup from |pref_service| and overwrites it with the timestamp of the | 86 // last startup from |pref_service| and overwrites it with the timestamp of the |
87 // current startup. If the startup temperature has been set by | 87 // current startup. If the startup temperature has been set by |
88 // RecordBrowserMainMessageLoopStart, the time since last startup is also logged | 88 // RecordBrowserMainMessageLoopStart, the time since last startup is also logged |
89 // to an histogram suffixed with the startup temperature. | 89 // to an histogram suffixed with the startup temperature. |
90 void RecordTimeSinceLastStartup(PrefService* pref_service); | 90 void RecordTimeSinceLastStartup(PrefService* pref_service); |
91 | 91 |
| 92 // Logs the Startup.SameVersionStartupCount histogram. Relies on |pref_service| |
| 93 // to know information about the previous startups and store information for |
| 94 // future ones. |
| 95 void RecordStartupCount(PrefService* pref_service); |
| 96 |
92 // Call this with the time when the first browser window became visible. | 97 // Call this with the time when the first browser window became visible. |
93 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); | 98 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); |
94 | 99 |
95 // Call this with the time delta that the browser spent opening its tabs. | 100 // Call this with the time delta that the browser spent opening its tabs. |
96 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); | 101 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); |
97 | 102 |
98 // Call this with a renderer main entry time. The value provided for the first | 103 // Call this with a renderer main entry time. The value provided for the first |
99 // call to this function is used to compute | 104 // call to this function is used to compute |
100 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this | 105 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this |
101 // function are ignored. | 106 // function are ignored. |
(...skipping 21 matching lines...) Expand all Loading... |
123 base::TimeTicks MainEntryPointTicks(); | 128 base::TimeTicks MainEntryPointTicks(); |
124 | 129 |
125 // Returns the startup type. This is only currently supported on the Windows | 130 // Returns the startup type. This is only currently supported on the Windows |
126 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. | 131 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. |
127 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). | 132 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). |
128 StartupTemperature GetStartupTemperature(); | 133 StartupTemperature GetStartupTemperature(); |
129 | 134 |
130 } // namespace startup_metric_utils | 135 } // namespace startup_metric_utils |
131 | 136 |
132 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 137 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
OLD | NEW |