OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_REPORTING_REPORTING_POLICY_H_ | 5 #ifndef NET_REPORTING_REPORTING_POLICY_H_ |
6 #define NET_REPORTING_REPORTING_POLICY_H_ | 6 #define NET_REPORTING_REPORTING_POLICY_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "net/base/backoff_entry.h" | 9 #include "net/base/backoff_entry.h" |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 // Various policy knobs for the Reporting system. | 14 // Various policy knobs for the Reporting system. |
15 struct NET_EXPORT ReportingPolicy { | 15 struct NET_EXPORT ReportingPolicy { |
16 // Provides a reasonable default for use in a browser embedder. | 16 // Provides a reasonable default for use in a browser embedder. |
17 ReportingPolicy(); | 17 ReportingPolicy(); |
18 ReportingPolicy(const ReportingPolicy& other); | 18 ReportingPolicy(const ReportingPolicy& other); |
19 ~ReportingPolicy(); | 19 ~ReportingPolicy(); |
20 | 20 |
21 // Maximum number of reports to queue before evicting the oldest. | 21 // Maximum number of reports to queue before evicting the oldest. |
22 size_t max_report_count; | 22 size_t max_report_count; |
23 | 23 |
| 24 // Maximum number of clients to remember before evicting least-recently-used. |
| 25 size_t max_client_count; |
| 26 |
24 // Minimum interval at which to attempt delivery of queued reports. | 27 // Minimum interval at which to attempt delivery of queued reports. |
25 base::TimeDelta delivery_interval; | 28 base::TimeDelta delivery_interval; |
26 | 29 |
27 // Backoff policy for failing endpoints. | 30 // Backoff policy for failing endpoints. |
28 BackoffEntry::Policy endpoint_backoff_policy; | 31 BackoffEntry::Policy endpoint_backoff_policy; |
29 | 32 |
30 // Minimum interval at which Reporting will persist state to (relatively) | 33 // Minimum interval at which Reporting will persist state to (relatively) |
31 // stable storage to be restored if the embedder restarts. | 34 // stable storage to be restored if the embedder restarts. |
32 base::TimeDelta persistence_interval; | 35 base::TimeDelta persistence_interval; |
33 | 36 |
(...skipping 19 matching lines...) Expand all Loading... |
53 bool clear_reports_on_network_changes; | 56 bool clear_reports_on_network_changes; |
54 | 57 |
55 // Whether to clear clients when the network changes to avoid leaking browsing | 58 // Whether to clear clients when the network changes to avoid leaking browsing |
56 // data between networks. | 59 // data between networks. |
57 bool clear_clients_on_network_changes; | 60 bool clear_clients_on_network_changes; |
58 }; | 61 }; |
59 | 62 |
60 } // namespace net | 63 } // namespace net |
61 | 64 |
62 #endif // NET_REPORTING_REPORTING_POLICY_H_ | 65 #endif // NET_REPORTING_REPORTING_POLICY_H_ |
OLD | NEW |