Commit 3bd51fa8 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

[startup metrics] Do not track initially hidden window and check navigation steps.

Prior to this CL, Startup.FirstWebContents.NonEmptyPaint2 was recorded for the
active WebContents in the first browser of the BrowserList. However, tests
highlighted that the first browser is not necessarily visible in session restore.
This CL changes the behavior to instead record
Startup.FirstWebContents.NonEmptyPaint2 for the active WebContents in the
first *visible* browser. It also adds a FinishReason for when no browser is
initially visible. This would allow us to track if there is a change in how often
Chrome starts with no initially visible browser (e.g. if this CL lands
https://chromium-review.googlesource.com/c/chromium/src/+/1888405/3/chrome/browser/sessions/session_restore.cc#477
we would start more often with no initially visible browser).

This CL also adds some DCHECKs to make sure that navigation events occur in the
order expected by FirstWebContentsProfiler.

Bug: 1020549
Change-Id: I0733a2b5af2f3617102232e9996459ad3b1c4c5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894417Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713192}
parent 16f13bff
......@@ -59579,6 +59579,9 @@ Called by update_net_trust_anchors.py.-->
<int value="5"
label="Abandoned because profiled content failed to load its main
resource"/>
<int value="6"
label="Abandoned because no content was visible at the beginning of
startup"/>
</enum>
<enum name="StartupTemperature">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment