Index: net/reporting/reporting_garbage_collector.h |
diff --git a/net/reporting/reporting_garbage_collector.h b/net/reporting/reporting_garbage_collector.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..51b2c70417ba3df7869bfaa96582145ab3fd5b54 |
--- /dev/null |
+++ b/net/reporting/reporting_garbage_collector.h |
@@ -0,0 +1,34 @@ |
+// 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_GARBAGE_COLLECTOR_H_ |
+#define NET_REPORTING_REPORTING_GARBAGE_COLLECTOR_H_ |
+ |
+#include <memory> |
+ |
+#include "net/base/net_export.h" |
+ |
+namespace base { |
+class Timer; |
+} // namespace base |
+ |
+namespace net { |
+ |
+class ReportingContext; |
+ |
+// Removes reports that have remained undelivered for too long or that have been |
+// included in too many failed delivery attempts. |
+class NET_EXPORT ReportingGarbageCollector { |
+ public: |
+ static std::unique_ptr<ReportingGarbageCollector> Create( |
+ ReportingContext* context); |
+ |
+ virtual ~ReportingGarbageCollector(); |
+ |
+ virtual void SetTimerForTesting(std::unique_ptr<base::Timer> timer) = 0; |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_REPORTING_REPORTING_GARBAGE_COLLECTOR_H_ |