Popup metrics: Add metrics for popup engagement

Desktop / Chromium - Charles Harrison [chromium.org] - 11 September 2017 17:35 EDT

This patch adds visibility tracking to the PopupTracker, and it logs the duration a popup is visible from its first navigation commit until that document is navigated away from (or the web contents is destroyed).

Bug: 762617 Change-Id: I538712c4f31e8335521da1a283852ef8db3b138d Reviewed-on: https://chromium-review.googlesource.com/656198

b614fd5 Popup metrics: Add metrics for popup engagement
chrome/browser/ui/BUILD.gn | 2 +
.../ui/blocked_content/popup_blocker_tab_helper.cc | 20 +--
chrome/browser/ui/blocked_content/popup_tracker.cc | 44 ++++++-
chrome/browser/ui/blocked_content/popup_tracker.h | 22 +++-
.../blocked_content/popup_tracker_browsertest.cc | 134 ++++++++++++++++++---
.../blocked_content/scoped_visibility_tracker.cc | 44 +++++++
.../ui/blocked_content/scoped_visibility_tracker.h | 42 +++++++
.../scoped_visibility_tracker_unittest.cc | 84 +++++++++++++
chrome/test/BUILD.gn | 1 +
tools/metrics/histograms/histograms.xml | 10 ++
10 files changed, 371 insertions(+), 32 deletions(-)

Upstream: git.chromium.org


  • Share