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

Unified Diff: components/startup_metric_utils/browser/startup_metric_utils.h

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: BrowserView --> BrowserWindow, use factory method for class creation. Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698