0
Files
src/content/browser/process_visibility_util.cc
Oksana Zhuravlova 3a4e421775 content/android: Add foreground/background UMAs for CPU time per process metrics
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}
2021-02-17 21:51:33 +00:00

16 lines
459 B
C++

// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/browser/process_visibility_util.h"
#include "content/common/process_visibility_tracker.h"
namespace content {
void OnBrowserVisibilityChanged(bool visible) {
ProcessVisibilityTracker::GetInstance()->OnProcessVisibilityChanged(visible);
}
} // namespace content