Chromium Code Reviews| 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 "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 | 9 |
| 10 class PrefRegistrySimple; | 10 class PrefRegistrySimple; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // call to this function is used to compute | 76 // call to this function is used to compute |
| 77 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this | 77 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this |
| 78 // function are ignored. | 78 // function are ignored. |
| 79 void RecordRendererMainEntryTime(base::TimeTicks ticks); | 79 void RecordRendererMainEntryTime(base::TimeTicks ticks); |
| 80 | 80 |
| 81 // Call this with the time when the first web contents loaded its main frame, | 81 // Call this with the time when the first web contents loaded its main frame, |
| 82 // only if the first web contents was unimpended in its attempt to do so. | 82 // only if the first web contents was unimpended in its attempt to do so. |
| 83 void RecordFirstWebContentsMainFrameLoad(base::TimeTicks ticks); | 83 void RecordFirstWebContentsMainFrameLoad(base::TimeTicks ticks); |
| 84 | 84 |
| 85 // Call this with the time when the first web contents had a non-empty paint, | 85 // Call this with the time when the first web contents had a non-empty paint, |
| 86 // only if the first web contents was unimpended in its attempt to do so. | 86 // only if the first web contents was unimpended in its attempt to do so. |
|
tdresser
2017/05/29 13:38:02
Can we fix unimpended -> unimpeded while we're her
hans
2017/05/31 19:48:57
Done.
| |
| 87 void RecordFirstWebContentsNonEmptyPaint(base::TimeTicks ticks); | 87 void RecordFirstWebContentsNonEmptyPaint( |
| 88 base::TimeTicks now, | |
| 89 base::TimeTicks render_process_host_init_time); | |
| 88 | 90 |
| 89 // Call this with the time when the first web contents began navigating its main | 91 // Call this with the time when the first web contents began navigating its main |
| 90 // frame. Adds a suffix to its metrics according to |workload|. | 92 // frame. Adds a suffix to its metrics according to |workload|. |
| 91 void RecordFirstWebContentsMainNavigationStart(base::TimeTicks ticks, | 93 void RecordFirstWebContentsMainNavigationStart(base::TimeTicks ticks, |
| 92 WebContentsWorkload workload); | 94 WebContentsWorkload workload); |
| 93 | 95 |
| 94 // Call this with the time when the first web contents successfully committed | 96 // Call this with the time when the first web contents successfully committed |
| 95 // its navigation for the main frame. | 97 // its navigation for the main frame. |
| 96 void RecordFirstWebContentsMainNavigationFinished(base::TimeTicks ticks); | 98 void RecordFirstWebContentsMainNavigationFinished(base::TimeTicks ticks); |
| 97 | 99 |
| 98 // Call this with the time when the Browser window painted its children for the | 100 // Call this with the time when the Browser window painted its children for the |
| 99 // first time. | 101 // first time. |
| 100 void RecordBrowserWindowFirstPaint(base::TimeTicks ticks); | 102 void RecordBrowserWindowFirstPaint(base::TimeTicks ticks); |
| 101 | 103 |
| 102 // Call this with the time when the Browser window painted its children for the | 104 // Call this with the time when the Browser window painted its children for the |
| 103 // first time and we got a CompositingEnded after that. | 105 // first time and we got a CompositingEnded after that. |
| 104 void RecordBrowserWindowFirstPaintCompositingEnded(base::TimeTicks ticks); | 106 void RecordBrowserWindowFirstPaintCompositingEnded(base::TimeTicks ticks); |
| 105 | 107 |
| 106 // Returns the TimeTicks corresponding to main entry as recorded by | 108 // Returns the TimeTicks corresponding to main entry as recorded by |
| 107 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been | 109 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been |
| 108 // recorded yet. This method is expected to be called from the UI thread. | 110 // recorded yet. This method is expected to be called from the UI thread. |
| 109 base::TimeTicks MainEntryPointTicks(); | 111 base::TimeTicks MainEntryPointTicks(); |
| 110 | 112 |
| 111 } // namespace startup_metric_utils | 113 } // namespace startup_metric_utils |
| 112 | 114 |
| 113 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ | 115 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ |
| OLD | NEW |