OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/reporting/reporting_policy.h" |
| 6 |
| 7 namespace net { |
| 8 |
| 9 ReportingPolicy::ReportingPolicy() |
| 10 : max_report_count(100), |
| 11 max_endpoint_count(100), |
| 12 max_report_age(base::TimeDelta::FromMinutes(15)), |
| 13 max_report_attempts(5), |
| 14 clear_reports_on_network_changes(true), |
| 15 persist_reports_across_restarts(false), |
| 16 persist_clients_across_restarts(true), |
| 17 deliver_interval(base::TimeDelta::FromMinutes(1)), |
| 18 persist_interval(base::TimeDelta::FromMinutes(1)) { |
| 19 endpoint_backoff_policy.num_errors_to_ignore = 0; |
| 20 endpoint_backoff_policy.initial_delay_ms = 60 * 1000; // 1 minute |
| 21 endpoint_backoff_policy.multiply_factor = 2.0; |
| 22 endpoint_backoff_policy.jitter_factor = 0.1; |
| 23 endpoint_backoff_policy.maximum_backoff_ms = -1; // 1 hour |
| 24 endpoint_backoff_policy.entry_lifetime_ms = -1; // infinite |
| 25 endpoint_backoff_policy.always_use_initial_delay = false; |
| 26 } |
| 27 |
| 28 ReportingPolicy::ReportingPolicy(const ReportingPolicy& other) |
| 29 : max_report_count(other.max_report_count), |
| 30 max_endpoint_count(other.max_endpoint_count), |
| 31 max_report_age(other.max_report_age), |
| 32 max_report_attempts(other.max_report_attempts), |
| 33 endpoint_backoff_policy(other.endpoint_backoff_policy), |
| 34 clear_reports_on_network_changes(other.clear_reports_on_network_changes), |
| 35 persist_reports_across_restarts(other.persist_reports_across_restarts), |
| 36 persist_clients_across_restarts(other.persist_clients_across_restarts), |
| 37 deliver_interval(other.deliver_interval), |
| 38 persist_interval(other.persist_interval) {} |
| 39 |
| 40 ReportingPolicy::~ReportingPolicy() {} |
| 41 |
| 42 } // namespace net |
OLD | NEW |