Index: components/startup_metric_utils/browser/startup_metric_utils.h |
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.h b/components/startup_metric_utils/browser/startup_metric_utils.h |
index 5ebb8ff5e77c397d7aeb649c001260765e611f68..2f235b3056128354cc0a853242dcfecd74847485 100644 |
--- a/components/startup_metric_utils/browser/startup_metric_utils.h |
+++ b/components/startup_metric_utils/browser/startup_metric_utils.h |
@@ -30,10 +30,9 @@ enum class WebContentsWorkload { |
// Registers startup related prefs in |registry|. |
void RegisterPrefs(PrefRegistrySimple* registry); |
-// Returns true if any UI other than the browser window has been displayed |
-// so far. Useful to test if UI has been displayed before the first browser |
-// window was shown, which would invalidate any surrounding timing metrics. |
-bool WasNonBrowserUIDisplayed(); |
+// Returns true when browser UI was not launched normally: some other UI was |
+// shown first or browser was launched in background mode. |
+bool WasMainWindowStartupInterrupted(); |
// Call this when displaying UI that might potentially delay startup events. |
// |
@@ -43,6 +42,10 @@ bool WasNonBrowserUIDisplayed(); |
// been displayed or not. |
void SetNonBrowserUIDisplayed(); |
+// Call this when background mode gets enabled, as it might delay startup |
+// events. |
+void SetBackgroundModeEnabled(); |
+ |
// Call this with the creation time of the startup (initial/main) process. |
void RecordStartupProcessCreationTime(const base::Time& time); |
@@ -92,6 +95,15 @@ void RecordFirstWebContentsMainNavigationStart(const base::TimeTicks& ticks, |
// its navigation for the main frame. |
void RecordFirstWebContentsMainNavigationFinished(const base::TimeTicks& ticks); |
+// Call this with the time when the Browser window painted its children for the |
+// first time. |
+void RecordBrowserWindowFirstPaint(const base::TimeTicks& ticks); |
+ |
+// Call this with the time when the Browser window painted its children for the |
+// first time and we got a CompositingEnded after that. |
+void RecordBrowserWindowFirstPaintCompositingEnded( |
+ const base::TimeTicks& ticks); |
+ |
// Returns the TimeTicks corresponding to main entry as recorded by |
// RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been |
// recorded yet. This method is expected to be called from the UI thread. |