Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: components/startup_metric_utils/startup_metric_utils.h

Issue 1407093003: Add start/finish navigation to startup metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_better_ownership_model_firstwebcontentsprofiler
Patch Set: rebase on trunk Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 successfully committed
82 // its navigation for the main frame.
83 void RecordFirstWebContentsMainNavigationFinished(const base::Time& time);
84
77 // Returns the time of main entry recorded from RecordMainEntryPointTime. 85 // Returns the time of main entry recorded from RecordMainEntryPointTime.
78 // Returns a null Time if a value has not been recorded yet. 86 // Returns a null Time if a value has not been recorded yet.
79 // This method is expected to be called from the UI thread. 87 // This method is expected to be called from the UI thread.
80 base::Time MainEntryPointTime(); 88 base::Time MainEntryPointTime();
81 89
82 // Returns the startup type. This is only currently supported on the Windows 90 // Returns the startup type. This is only currently supported on the Windows
83 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms. 91 // platform and will simply return UNCERTAIN_STARTUP_TYPE on other platforms.
84 // This is only valid after a call to RecordBrowserMainMessageLoopStart(). 92 // This is only valid after a call to RecordBrowserMainMessageLoopStart().
85 StartupTemperature GetStartupTemperature(); 93 StartupTemperature GetStartupTemperature();
86 94
87 } // namespace startup_metric_utils 95 } // namespace startup_metric_utils
88 96
89 #endif // COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_ 97 #endif // COMPONENTS_STARTUP_METRIC_UTILS_STARTUP_METRIC_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698