Adding opt out and previews type information to DRP pingback

Desktop / Chromium - ryansturm [chromium.org] - 21 April 2017 13:25 EDT

This CL adds the previews type that was shown for a page load and also reports when a page load was an opt out (clicked show original). Due to backgrounding behavior, when app background occurs or there is not a previews shown a third opt out state of unknown is reported. LoFi page state is determined if any subresources were LoFi images. Lite page uses the main resource to determine preview state.

BUG=713236

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

6ffce94 Adding opt out and previews type information to DRP pingback
.../chrome_resource_dispatcher_host_delegate.cc | 22 +-
.../metrics_web_contents_observer.cc | 7 +-
.../metrics_web_contents_observer.h | 17 +-
.../core_page_load_metrics_observer_unittest.cc | 26 +-
.../data_reduction_proxy_metrics_observer.cc | 18 +-
.../data_reduction_proxy_metrics_observer.h | 3 +-
...ta_reduction_proxy_metrics_observer_unittest.cc | 76 ++++--
.../media_page_load_metrics_observer_unittest.cc | 18 +-
.../page_load_metrics_observer_test_harness.cc | 13 +-
...subresource_filter_metrics_observer_unittest.cc | 24 +-
..._restore_page_load_metrics_observer_unittest.cc | 18 +-
.../page_load_metrics_observer.cc | 18 +-
.../page_load_metrics/page_load_metrics_observer.h | 16 +-
.../browser/previews/previews_infobar_delegate.cc | 22 +-
.../previews/previews_infobar_delegate_unittest.cc | 102 ++++++++
.../previews/previews_infobar_tab_helper.cc | 50 +++-
.../browser/previews/previews_infobar_tab_helper.h | 18 ++
.../previews_infobar_tab_helper_unittest.cc | 4 +
.../data_reduction_proxy_config_service_client.h | 2 +-
.../core/browser/data_reduction_proxy_data.cc | 4 +
.../core/browser/data_reduction_proxy_data.h | 24 +-
.../browser/data_reduction_proxy_data_unittest.cc | 30 ++-
.../data_reduction_proxy_network_delegate.cc | 38 ++-
.../data_reduction_proxy_network_delegate.h | 9 +
...ta_reduction_proxy_network_delegate_unittest.cc | 14 +-
.../data_reduction_proxy_pingback_client.cc | 62 ++++-
.../browser/data_reduction_proxy_pingback_client.h | 23 ++
...ata_reduction_proxy_pingback_client_unittest.cc | 285 ++++++++++++++++++---
.../data_reduction_proxy_page_load_timing.cc | 6 +-
.../common/data_reduction_proxy_page_load_timing.h | 5 +-
.../proto/pageload_metrics.proto | 26 ++
31 files changed, 818 insertions(+), 182 deletions(-)

Upstream: git.chromium.org


  • Share