Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Unified Diff: net/reporting/reporting_policy.cc

Issue 2813103005: Reporting: Observe network changes and clear reports/clients (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/reporting/reporting_policy.cc
diff --git a/net/reporting/reporting_policy.cc b/net/reporting/reporting_policy.cc
index 9461bfcb5cd9c36f92fc2b5348a58c2642f73a6b..dbdea626caf78a430986d09d588a6cf5303459e5 100644
--- a/net/reporting/reporting_policy.cc
+++ b/net/reporting/reporting_policy.cc
@@ -14,7 +14,9 @@ ReportingPolicy::ReportingPolicy()
persist_clients_across_restarts(true),
garbage_collection_interval(base::TimeDelta::FromMinutes(5)),
max_report_age(base::TimeDelta::FromMinutes(15)),
- max_report_attempts(5) {
+ max_report_attempts(5),
+ clear_reports_on_network_changes(true),
+ clear_clients_on_network_changes(false) {
endpoint_backoff_policy.num_errors_to_ignore = 0;
endpoint_backoff_policy.initial_delay_ms = 60 * 1000; // 1 minute
endpoint_backoff_policy.multiply_factor = 2.0;
@@ -31,7 +33,10 @@ ReportingPolicy::ReportingPolicy(const ReportingPolicy& other)
persist_clients_across_restarts(other.persist_clients_across_restarts),
garbage_collection_interval(other.garbage_collection_interval),
max_report_age(other.max_report_age),
- max_report_attempts(other.max_report_attempts) {}
+ max_report_attempts(other.max_report_attempts),
+ clear_reports_on_network_changes(other.clear_reports_on_network_changes),
+ clear_clients_on_network_changes(other.clear_clients_on_network_changes) {
+}
ReportingPolicy::~ReportingPolicy() {}

Powered by Google App Engine
This is Rietveld 408576698