Index: net/http/certificate_report_sender.h |
diff --git a/net/http/certificate_report_sender.h b/net/http/certificate_report_sender.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3faf473a10c08cc3b29afe8022eaae92d4f66ad4 |
--- /dev/null |
+++ b/net/http/certificate_report_sender.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2015 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_HTTP_CERTIFICATE_REPORT_SENDER_H_ |
+#define NET_HTTP_CERTIFICATE_REPORT_SENDER_H_ |
+ |
+#include <string> |
+ |
+class GURL; |
+ |
+namespace net { |
+ |
+class URLRequestContext; |
+ |
+// An interface for asynchronously sending serialized certificate |
+// reports to a URI. It takes serialized reports as a sequence of bytes |
+// so as to be agnostic to the format of the report being sent (JSON, |
+// protobuf, etc.) and the particular data that it contains. Multiple |
+// reports can be in-flight at once. |
+class CertificateReportSender { |
+ public: |
+ virtual ~CertificateReportSender() {} |
+ |
+ // Asynchronously sends the given serialized |report| to |
+ // |report_uri|. There are no guarantees that the report will be sent |
+ // right away, though it will be sent eventually. |
davidben
2015/07/23 00:09:41
Probably should add to the API contract:
Requests
estark
2015/07/23 02:41:21
Done.
|
+ virtual void Send(const GURL& report_uri, const std::string& report) = 0; |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_HTTP_CERTIFICATE_REPORT_SENDER_H_ |