Skip to content

Commit

Permalink
Reporting: Document browsing data remover + endpoint backoff
Browse files Browse the repository at this point in the history
The ReportingBrowsingDataRemover currently doesn't remove entries from
the endpoint backoff map in the ReportingEndpointManager, because it's
never persisted to disk. This CL adds comments in a couple places to
note this, so someone implementing persistence for that knows to
implement browsing data removal as well.

BUG=704259,676324

Review-Url: https://codereview.chromium.org/2862003003
Cr-Commit-Position: refs/heads/master@{#470336}
  • Loading branch information
juliatuttle authored and Commit bot committed May 9, 2017
1 parent f664256 commit cf0772c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/reporting/reporting_browsing_data_remover.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class NET_EXPORT ReportingBrowsingDataRemover {
// which types of data to remove: reports queued by browser features and/or
// clients (endpoints configured by origins). |origin_filter|, if not null,
// specifies which origins' data to remove.
//
// Note: Currently this does not clear the endpoint backoff data in
// ReportingEndpointManager because that's not persisted to disk. If it's ever
// persisted, it will need to be cleared as well.
virtual void RemoveBrowsingData(
int data_type_mask,
base::Callback<bool(const GURL&)> origin_filter) = 0;
Expand Down
4 changes: 4 additions & 0 deletions net/reporting/reporting_endpoint_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ class NET_EXPORT ReportingEndpointManager {
ReportingContext* context_;

std::set<GURL> pending_endpoints_;

// Note: Currently the ReportingBrowsingDataRemover does not clear this data
// because it's not persisted to disk. If it's ever persisted, it will need
// to be cleared as well.
std::map<GURL, std::unique_ptr<net::BackoffEntry>> endpoint_backoff_;

DISALLOW_COPY_AND_ASSIGN(ReportingEndpointManager);
Expand Down

0 comments on commit cf0772c

Please sign in to comment.