This change introduces ProcessVisibilityTracker, which receives
updates on visibility from the browser process in WebView and
Chrome for Android. ProcessCpuTimeTaskObserver receives an update from
ProcessVisibilityTracker and logs two additional histograms for
CPU time metrics: Power.CpuTimeSecondsPerProcessType.Foreground and
Power.CpuTimeSecondsPerProcessType.Background.
Follow-up CLs will implement similar logic in the renderer and GPU
processes.
Bug: 470582, 1177542
Change-Id: I067f3fd77fb51523ec7084a49884a169f16aadd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2666376
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#854959}