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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Call this with the time when the first browser window became visible. | 69 // Call this with the time when the first browser window became visible. |
70 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); | 70 void RecordBrowserWindowDisplay(const base::TimeTicks& ticks); |
71 | 71 |
72 // Call this with the time delta that the browser spent opening its tabs. | 72 // Call this with the time delta that the browser spent opening its tabs. |
73 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); | 73 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); |
74 | 74 |
75 // Call this with the time when the first web contents loaded its main frame, | 75 // Call this with the time when the first web contents loaded its main frame, |
76 // only if the first web contents was unimpended in its attempt to do so. | 76 // only if the first web contents was unimpended in its attempt to do so. |
77 void RecordFirstWebContentsMainFrameLoad(const base::TimeTicks& ticks); | 77 void RecordFirstWebContentsMainFrameLoad(const base::TimeTicks& ticks); |
78 | 78 |
79 // Call this with the time when the first web contents loaded its main frame. | |
80 // This records an old stat kept for comparison purposes until M49. | |
81 void RecordDeprecatedFirstWebContentsMainFrameLoad( | |
82 const base::TimeTicks& ticks); | |
83 | |
84 // Call this with the time when the first web contents had a non-empty paint, | 79 // Call this with the time when the first web contents had a non-empty paint, |
85 // only if the first web contents was unimpended in its attempt to do so. | 80 // only if the first web contents was unimpended in its attempt to do so. |
86 void RecordFirstWebContentsNonEmptyPaint(const base::TimeTicks& ticks); | 81 void RecordFirstWebContentsNonEmptyPaint(const base::TimeTicks& ticks); |
87 | 82 |
88 // Call this with the time when the first web contents had a non-empty paint. | |
89 // This records an old stat kept for comparison purposes until M49. | |
90 void RecordDeprecatedFirstWebContentsNonEmptyPaint( | |
91 const base::TimeTicks& ticks); | |
92 | |
93 // Call this with the time when the first web contents began navigating its main | 83 // Call this with the time when the first web contents began navigating its main |
94 // frame. | 84 // frame. |
95 void RecordFirstWebContentsMainNavigationStart(const base::TimeTicks& ticks); | 85 void RecordFirstWebContentsMainNavigationStart(const base::TimeTicks& ticks); |
96 | 86 |
97 // Call this with the time when the first web contents successfully committed | 87 // Call this with the time when the first web contents successfully committed |
98 // its navigation for the main frame. | 88 // its navigation for the main frame. |
99 void RecordFirstWebContentsMainNavigationFinished(const base::TimeTicks& ticks); | 89 void RecordFirstWebContentsMainNavigationFinished(const base::TimeTicks& ticks); |
100 | 90 |
101 // Returns the TimeTicks corresponding to main entry as recorded by | 91 // Returns the TimeTicks corresponding to main entry as recorded by |
102 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been | 92 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been |
103 // recorded yet. This method is expected to be called from the UI thread. | 93 // recorded yet. This method is expected to be called from the UI thread. |
104 base::TimeTicks MainEntryPointTicks(); | 94 base::TimeTicks MainEntryPointTicks(); |
105 | 95 |
106 // Returns the startup type. This is only currently supported on the Windows | 96 // Returns the startup type. This is only currently supported on the Windows |
107 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. | 97 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. |
108 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). | 98 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). |
109 StartupTemperature GetStartupTemperature(); | 99 StartupTemperature GetStartupTemperature(); |
110 | 100 |
111 } // namespace startup_metric_utils | 101 } // namespace startup_metric_utils |
112 | 102 |
113 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 103 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
OLD | NEW |