Add UMA collection for the prefetch daily stats

Desktop / Chromium - Dmitry Titov [chromium.org] - 11 October 2017 23:37 EDT

This starts to collect statistics for number of user-days when:- Prefetch and Zine were enabled and Chrome has received new URLs for prefetch
- A page was successfully prefetched.- User opened a prefetched page The data is collected during a day and accumulated in daily persistent counters that are periodically reported to UMA.

Bug: 701939 Change-Id: I1a67f8bf0daeca3022485293daca7cdfffefeba4 Reviewed-on: https://chromium-review.googlesource.com/710509 Commit-Queue: Dmitry Titov

4f0e4a4 Add UMA collection for the prefetch daily stats.
.../offline_pages/offline_page_tab_helper.cc | 7 ++
.../offline_pages/offline_page_tab_helper.h | 5 +
.../offline_page_tab_helper_unittest.cc | 4 +
.../prefetch/offline_metrics_collector_impl.cc | 133 +++++++++++++++++++--
.../prefetch/offline_metrics_collector_impl.h | 50 +++++++-
.../offline_metrics_collector_impl_unittest.cc | 116 ++++++++++++++++++
chrome/common/pref_names.cc | 20 ++++
chrome/common/pref_names.h | 9 ++
.../core/prefetch/offline_metrics_collector.h | 20 ++++
.../core/prefetch/prefetch_dispatcher_impl.cc | 7 ++
.../core/prefetch/test_offline_metrics_collector.h | 4 +
tools/metrics/histograms/enums.xml | 15 +++
tools/metrics/histograms/histograms.xml | 21 ++++
13 files changed, 396 insertions(+), 15 deletions(-)

Upstream: git.chromium.org


  • Share