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

Side by Side Diff: net/reporting/reporting_policy.h

Issue 2785293003: Reporting: Make DeliveryAgent self-scheduling. (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 unified diff | Download patch
« no previous file with comments | « net/reporting/reporting_delivery_agent_unittest.cc ('k') | net/reporting/reporting_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Minimum interval at which to attempt delivery of queued reports.
22 base::TimeDelta delivery_interval;
23
21 // Backoff policy for failing endpoints. 24 // Backoff policy for failing endpoints.
22 BackoffEntry::Policy endpoint_backoff_policy; 25 BackoffEntry::Policy endpoint_backoff_policy;
23 26
24 // Minimum interval at which Reporting will persist state to (relatively) 27 // Minimum interval at which Reporting will persist state to (relatively)
25 // stable storage to be restored if the embedder restarts. 28 // stable storage to be restored if the embedder restarts.
26 base::TimeDelta persistence_interval; 29 base::TimeDelta persistence_interval;
27 30
28 // Whether to persist undelivered reports across embedder restarts. 31 // Whether to persist undelivered reports across embedder restarts.
29 bool persist_reports_across_restarts; 32 bool persist_reports_across_restarts;
30 33
31 // Whether to persist clients (per-origin endpoint configurations) across 34 // Whether to persist clients (per-origin endpoint configurations) across
32 // embedder restarts. 35 // embedder restarts.
33 bool persist_clients_across_restarts; 36 bool persist_clients_across_restarts;
34 37
35 // Minimum interval at which to garbage-collect the cache. 38 // Minimum interval at which to garbage-collect the cache.
36 base::TimeDelta garbage_collection_interval; 39 base::TimeDelta garbage_collection_interval;
37 40
38 // Maximum age a report can be queued for before being discarded as expired. 41 // Maximum age a report can be queued for before being discarded as expired.
39 base::TimeDelta max_report_age; 42 base::TimeDelta max_report_age;
40 43
41 // Maximum number of delivery attempts a report can have before being 44 // Maximum number of delivery attempts a report can have before being
42 // discarded as failed. 45 // discarded as failed.
43 int max_report_attempts; 46 int max_report_attempts;
44 }; 47 };
45 48
46 } // namespace net 49 } // namespace net
47 50
48 #endif // NET_REPORTING_REPORTING_POLICY_H_ 51 #endif // NET_REPORTING_REPORTING_POLICY_H_
OLDNEW
« no previous file with comments | « net/reporting/reporting_delivery_agent_unittest.cc ('k') | net/reporting/reporting_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698