Index: net/reporting/reporting_policy.cc |
diff --git a/net/reporting/reporting_policy.cc b/net/reporting/reporting_policy.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5112ad545dd0215c329b19d86e725c06a723ffa8 |
--- /dev/null |
+++ b/net/reporting/reporting_policy.cc |
@@ -0,0 +1,42 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "net/reporting/reporting_policy.h" |
+ |
+namespace net { |
+ |
+ReportingPolicy::ReportingPolicy() |
+ : max_report_count(100), |
+ max_endpoint_count(100), |
+ max_report_age(base::TimeDelta::FromMinutes(15)), |
+ max_report_attempts(5), |
+ clear_reports_on_network_changes(true), |
+ persist_reports_across_restarts(false), |
+ persist_clients_across_restarts(true), |
+ deliver_interval(base::TimeDelta::FromMinutes(1)), |
+ persist_interval(base::TimeDelta::FromMinutes(1)) { |
+ 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; |
+ endpoint_backoff_policy.jitter_factor = 0.1; |
+ endpoint_backoff_policy.maximum_backoff_ms = -1; // 1 hour |
+ endpoint_backoff_policy.entry_lifetime_ms = -1; // infinite |
+ endpoint_backoff_policy.always_use_initial_delay = false; |
+} |
+ |
+ReportingPolicy::ReportingPolicy(const ReportingPolicy& other) |
+ : max_report_count(other.max_report_count), |
+ max_endpoint_count(other.max_endpoint_count), |
+ max_report_age(other.max_report_age), |
+ max_report_attempts(other.max_report_attempts), |
+ endpoint_backoff_policy(other.endpoint_backoff_policy), |
+ clear_reports_on_network_changes(other.clear_reports_on_network_changes), |
+ persist_reports_across_restarts(other.persist_reports_across_restarts), |
+ persist_clients_across_restarts(other.persist_clients_across_restarts), |
+ deliver_interval(other.deliver_interval), |
+ persist_interval(other.persist_interval) {} |
+ |
+ReportingPolicy::~ReportingPolicy() {} |
+ |
+} // namespace net |