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_STARTUP_METRIC_UTILS_H_ | 5 #ifndef COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_ |
6 #define COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_ | 6 #define COMPONENTS_STARTUP_METRIC_UTILS_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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // Call this with the time delta that the browser spent opening its tabs. | 68 // Call this with the time delta that the browser spent opening its tabs. |
69 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); | 69 void RecordBrowserOpenTabsDelta(const base::TimeDelta& delta); |
70 | 70 |
71 // Call this with the time when the first web contents loaded its main frame. | 71 // Call this with the time when the first web contents loaded its main frame. |
72 void RecordFirstWebContentsMainFrameLoad(const base::Time& time); | 72 void RecordFirstWebContentsMainFrameLoad(const base::Time& time); |
73 | 73 |
74 // Call this with the time when the first web contents had a non-empty paint. | 74 // Call this with the time when the first web contents had a non-empty paint. |
75 void RecordFirstWebContentsNonEmptyPaint(const base::Time& time); | 75 void RecordFirstWebContentsNonEmptyPaint(const base::Time& time); |
76 | 76 |
| 77 // Call this with the time when the first web contents began navigating its main |
| 78 // frame. |
| 79 void RecordFirstWebContentsMainNavigationStart(const base::Time& time); |
| 80 |
| 81 // Call this with the time when the first web contents completed a navigation |
| 82 // for its main frame. |
| 83 void RecordFirstWebContentsMainNavigationFinishedFirst(const base::Time& time); |
| 84 |
| 85 // Call this with the time when the first web contents completed all navigations |
| 86 // for its main frame. |
| 87 void RecordFirstWebContentsMainNavigationFinishedAll(const base::Time& time); |
| 88 |
77 // Returns the time of main entry recorded from RecordMainEntryPointTime. | 89 // Returns the time of main entry recorded from RecordMainEntryPointTime. |
78 // Returns a null Time if a value has not been recorded yet. | 90 // Returns a null Time if a value has not been recorded yet. |
79 // This method is expected to be called from the UI thread. | 91 // This method is expected to be called from the UI thread. |
80 base::Time MainEntryPointTime(); | 92 base::Time MainEntryPointTime(); |
81 | 93 |
82 // Returns the startup type. This is only currently supported on the Windows | 94 // Returns the startup type. This is only currently supported on the Windows |
83 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. | 95 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. |
84 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). | 96 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). |
85 StartupTemperature GetStartupTemperature(); | 97 StartupTemperature GetStartupTemperature(); |
86 | 98 |
87 } // namespace startup_metric_utils | 99 } // namespace startup_metric_utils |
88 | 100 |
89 #endif // COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_ | 101 #endif // COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_ |
OLD | NEW |