Add more granularity to the Browser.Tabs.TotalSwitchDuration metrics

The new metrics will indicate the state of the tab Chrome is switching
to (loaded/frozen) and will give more information about the impact of
tab freezing on tab switch time.

All the functions that takes a |tab_switch_start_time| argument have
been updated to accept a newly defined TabSwitchStartState structure
instead, this allows passing more information about the tab switch
event to the TabSwitchTimeRecorder class.


Change-Id: I56e1697dcc78b46a6f680b1ef1a8a483289a26e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594924
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Auto-Submit: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660911}
27 files changed