Add UKM metrics for media watch time

Desktop / Chromium - dalecurtis [chromium.org] - 24 May 2017 04:30 EDT

Makes UKM accessable to content/ and adds watch time metric recording for UKM based on the origin url hosting the player.

To achieve this it was necessary to componentize components/ukm with the appropriate export macros or we end up with multiple internal static variables in testing (this was likely already an issue for the static sequence counter, but went unnoticed).

BUG=716643 TEST=new unittests

Review-Url: https://codereview.chromium.org/2865583002 Cr-Commit-Position: refs/heads/master@{#474213}

2cff7f3 Add UKM metrics for media watch time.
.../core/browser/autofill_manager_unittest.cc | 17 +-
.../core/browser/autofill_metrics_unittest.cc | 175 +++++++++------------
.../autofill/core/browser/test_autofill_client.cc | 2 +-
.../autofill/core/browser/test_autofill_client.h | 3 -
components/ukm/BUILD.gn | 1 +
components/ukm/public/BUILD.gn | 5 +-
components/ukm/public/ukm_entry_builder.h | 3 +-
components/ukm/public/ukm_export.h | 29 ++++
components/ukm/public/ukm_recorder.cc | 17 +-
components/ukm/public/ukm_recorder.h | 12 +-
components/ukm/test_ukm_recorder.h | 6 +-
content/browser/BUILD.gn | 1 +
content/browser/DEPS | 1 +
content/browser/media/media_internals.cc | 91 +++++++++--
content/browser/media/media_internals.h | 8 +
content/browser/media/media_internals_unittest.cc | 63 +++++++-
content/test/BUILD.gn | 2 +
media/base/media_log.cc | 8 +
media/base/media_log.h | 2 +
media/blink/webmediaplayer_impl.cc | 4 +-
tools/metrics/common/models.py | 1 +
tools/metrics/ukm/ukm.xml | 39 +++++
22 files changed, 346 insertions(+), 144 deletions(-)

Upstream: git.chromium.org


  • Share