Index: net/reporting/reporting_service.h |
diff --git a/net/reporting/reporting_service.h b/net/reporting/reporting_service.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8f5567653d35f5030a5d6367f2e70b2a72e90b5f |
--- /dev/null |
+++ b/net/reporting/reporting_service.h |
@@ -0,0 +1,62 @@ |
+// 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_SERVICE_H_ |
+#define NET_REPORTING_REPORTING_SERVICE_H_ |
+ |
+#include <memory> |
+#include <string> |
+ |
+#include "base/callback.h" |
+#include "base/macros.h" |
+#include "net/base/net_export.h" |
+ |
+class GURL; |
+ |
+namespace base { |
+class Value; |
+} // namespace |
+ |
+namespace net { |
+ |
+class ReportingContext; |
+class ReportingDelegate; |
+struct ReportingPolicy; |
+class URLRequestContext; |
+ |
+class NET_EXPORT ReportingService { |
shivanisha
2017/04/04 17:52:43
Comment describing the overall purpose of the clas
Julia Tuttle
2017/04/04 18:37:16
Done.
|
+ public: |
+ virtual ~ReportingService(); |
+ |
+ static std::unique_ptr<ReportingService> Create( |
+ const ReportingPolicy& policy, |
+ URLRequestContext* request_context, |
+ std::unique_ptr<ReportingDelegate> delegate); |
shivanisha
2017/04/04 17:52:43
Comment describing the arguments.
Julia Tuttle
2017/04/04 18:37:16
Done.
|
+ |
+ static std::unique_ptr<ReportingService> CreateForTesting( |
+ std::unique_ptr<ReportingContext> reporting_context); |
+ |
+ virtual void QueueReport(const GURL& url, |
+ const std::string& group, |
+ const std::string& type, |
+ std::unique_ptr<const base::Value> body) = 0; |
+ |
+ virtual void ProcessHeader(const GURL& url, |
+ const std::string& header_value) = 0; |
+ |
+ virtual void RemoveBrowsingData( |
+ bool remove_reports, |
+ bool remove_clients, |
+ base::Callback<bool(const GURL&)> origin_filter) = 0; |
shivanisha
2017/04/04 17:52:43
Comments for all of the above APIs.
Julia Tuttle
2017/04/04 18:37:16
Done.
|
+ |
+ protected: |
+ ReportingService() {} |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ReportingService); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_REPORTING_REPORTING_SERVICE_H_ |