Reporting: Make DeliveryAgent self-scheduling

Desktop / Chromium - juliatuttle [chromium.org] - 19 April 2017 13:50 EDT

Reporting is a spec for delivering out-of-band reports from various other parts of the browser. See http://wicg.github.io/reporting/ for the spec, or https://goo.gl/pygX5I for details of the planned implementation in Chromium.

This makes the existing DeliveryAgent class self-scheduling using the ReportingObserver interface: when reports are added to the cache, or periodically while reports are still queued, it automatically runs the "send reports" algorithm described in the spec.

BUG=704259

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

830962a Reporting: Make DeliveryAgent self-scheduling.
net/reporting/reporting_context.cc | 10 +-
net/reporting/reporting_delivery_agent.cc | 215 ++++++++++++++-------
net/reporting/reporting_delivery_agent.h | 55 ++----
net/reporting/reporting_delivery_agent_unittest.cc | 48 +++--
net/reporting/reporting_policy.cc | 6 +-
net/reporting/reporting_policy.h | 3 +
net/reporting/reporting_test_util.cc | 10 +-
net/reporting/reporting_test_util.h | 10 +-
8 files changed, 222 insertions(+), 135 deletions(-)

Upstream: git.chromium.org


  • Share