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

Unified Diff: net/reporting/reporting_policy.cc

Issue 2751883003: Reporting: Implement serializer. (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
« no previous file with comments | « net/reporting/reporting_policy.h ('k') | net/reporting/reporting_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/reporting/reporting_policy.cc
diff --git a/net/reporting/reporting_policy.cc b/net/reporting/reporting_policy.cc
index abf58b8e567e6061725384f7bebc789af194a63b..9461bfcb5cd9c36f92fc2b5348a58c2642f73a6b 100644
--- a/net/reporting/reporting_policy.cc
+++ b/net/reporting/reporting_policy.cc
@@ -4,12 +4,17 @@
#include "net/reporting/reporting_policy.h"
+#include "base/time/time.h"
+
namespace net {
ReportingPolicy::ReportingPolicy()
- : max_report_age(base::TimeDelta::FromMinutes(15)),
- max_report_attempts(5),
- garbage_collection_interval(base::TimeDelta::FromMinutes(5)) {
+ : persistence_interval(base::TimeDelta::FromMinutes(1)),
+ persist_reports_across_restarts(false),
+ persist_clients_across_restarts(true),
+ garbage_collection_interval(base::TimeDelta::FromMinutes(5)),
+ max_report_age(base::TimeDelta::FromMinutes(15)),
+ max_report_attempts(5) {
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;
@@ -20,10 +25,13 @@ ReportingPolicy::ReportingPolicy()
}
ReportingPolicy::ReportingPolicy(const ReportingPolicy& other)
- : max_report_age(other.max_report_age),
- max_report_attempts(other.max_report_attempts),
- endpoint_backoff_policy(other.endpoint_backoff_policy),
- garbage_collection_interval(other.garbage_collection_interval) {}
+ : endpoint_backoff_policy(other.endpoint_backoff_policy),
+ persistence_interval(other.persistence_interval),
+ persist_reports_across_restarts(other.persist_reports_across_restarts),
+ 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) {}
ReportingPolicy::~ReportingPolicy() {}
« no previous file with comments | « net/reporting/reporting_policy.h ('k') | net/reporting/reporting_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698