Index: net/reporting/reporting_policy.h |
diff --git a/net/reporting/reporting_policy.h b/net/reporting/reporting_policy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3678d4f68d1db8d11668cb57c842f1f18acf9b18 |
--- /dev/null |
+++ b/net/reporting/reporting_policy.h |
@@ -0,0 +1,58 @@ |
+// 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. |
+ |
+#ifndef NET_REPORTING_REPORTING_POLICY_H_ |
+#define NET_REPORTING_REPORTING_POLICY_H_ |
+ |
+#include "base/time/time.h" |
+#include "net/base/backoff_entry.h" |
+#include "net/base/net_export.h" |
+ |
+namespace net { |
+ |
+// Various policy knobs for the Reporting system. |
+struct NET_EXPORT ReportingPolicy { |
+ // Provides a reasonable default for use in a browser embedder. |
+ ReportingPolicy(); |
+ ReportingPolicy(const ReportingPolicy& other); |
+ ~ReportingPolicy(); |
+ |
+ // Maximum number of reports that can be queued before evicting the |
+ // oldest-quieued. |
shivanisha
2017/04/03 15:39:05
nit: spelling of queued
Julia Tuttle
2017/04/04 18:28:02
Obsolete.
|
+ int max_report_count; |
+ |
+ // Maximum number of endpoints that can be configured before evicting the |
+ // oldest-used. |
+ int max_endpoint_count; |
shivanisha
2017/04/03 15:39:05
Which classes implement the max_report_count , max
Julia Tuttle
2017/04/04 18:28:02
They will be implemented in the cache, but I'm act
shivanisha
2017/04/05 16:52:57
Sounds good.
|
+ |
+ // Maximum age a report can be queued for before being discarded as expired. |
+ base::TimeDelta max_report_age; |
+ |
+ // Maximum number of delivery attempts a report can have before being |
+ // discarded as failed. |
+ int max_report_attempts; |
+ |
+ // Backoff policy for failing endpoints. |
+ BackoffEntry::Policy endpoint_backoff_policy; |
+ |
+ // Whether to clear reports on network changes. |
+ bool clear_reports_on_network_changes; |
+ |
+ // Whether to persist reports across browser/embedder restarts. |
+ bool persist_reports_across_restarts; |
+ |
+ // Whether to persist clients across browser/embedder restarts. |
+ bool persist_clients_across_restarts; |
+ |
+ // Minimum interval at which to attempt to deliver undelivered reports. |
+ base::TimeDelta deliver_interval; |
+ |
+ // Minimum interval at which to persist reports and/or clients for use on a |
+ // future restart. |
+ base::TimeDelta persist_interval; |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_REPORTING_REPORTING_POLICY_H_ |