| Index: net/url_request/report_sender.h
|
| diff --git a/net/url_request/certificate_report_sender.h b/net/url_request/report_sender.h
|
| similarity index 54%
|
| rename from net/url_request/certificate_report_sender.h
|
| rename to net/url_request/report_sender.h
|
| index f71fbe418f8a97eed1fa6cdeef728bc6a5d31999..cdc371b1330326c688d33142247f1136c8557ff4 100644
|
| --- a/net/url_request/certificate_report_sender.h
|
| +++ b/net/url_request/report_sender.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_
|
| -#define NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_
|
| +#ifndef NET_URL_REQUEST_REPORT_SENDER_H_
|
| +#define NET_URL_REQUEST_REPORT_SENDER_H_
|
|
|
| #include <memory>
|
| #include <set>
|
| @@ -20,41 +20,40 @@ namespace net {
|
|
|
| class URLRequestContext;
|
|
|
| -// CertificateReportSender asynchronously sends 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. This class owns inflight requests
|
| -// and cleans them up when necessary.
|
| -class NET_EXPORT CertificateReportSender
|
| +// ReportSender asynchronously sends serialized 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. This class
|
| +// owns inflight requests and cleans them up when necessary.
|
| +class NET_EXPORT ReportSender
|
| : public URLRequest::Delegate,
|
| - public TransportSecurityState::ReportSender {
|
| + public TransportSecurityState::ReportSenderInterface {
|
| public:
|
| using ErrorCallback = base::Callback<void(const GURL&, int)>;
|
|
|
| // Represents whether or not to send cookies along with reports.
|
| enum CookiesPreference { SEND_COOKIES, DO_NOT_SEND_COOKIES };
|
|
|
| - // Constructs a CertificateReportSender that sends reports with the
|
| + // Constructs a ReportSender that sends reports with the
|
| // given |request_context| and includes or excludes cookies based on
|
| // |cookies_preference|. |request_context| must outlive the
|
| - // CertificateReportSender.
|
| - CertificateReportSender(URLRequestContext* request_context,
|
| - CookiesPreference cookies_preference);
|
| + // ReportSender.
|
| + ReportSender(URLRequestContext* request_context,
|
| + CookiesPreference cookies_preference);
|
|
|
| - // Constructs a CertificateReportSender that sends reports with the
|
| + // Constructs a ReportSender that sends reports with the
|
| // given |request_context| and includes or excludes cookies based on
|
| // |cookies_preference|. |request_context| must outlive the
|
| - // CertificateReportSender. When sending a report results in an error,
|
| + // ReportSender. When sending a report results in an error,
|
| // |error_callback| is called with the report URI and net error as
|
| // arguments.
|
| - CertificateReportSender(URLRequestContext* request_context,
|
| - CookiesPreference cookies_preference,
|
| - const ErrorCallback& error_callback);
|
| + ReportSender(URLRequestContext* request_context,
|
| + CookiesPreference cookies_preference,
|
| + const ErrorCallback& error_callback);
|
|
|
| - ~CertificateReportSender() override;
|
| + ~ReportSender() override;
|
|
|
| - // TransportSecurityState::ReportSender implementation.
|
| + // TransportSecurityState::ReportSenderInterface implementation.
|
| void Send(const GURL& report_uri, const std::string& report) override;
|
| void SetErrorCallback(const ErrorCallback& error_callback) override;
|
|
|
| @@ -73,9 +72,9 @@ class NET_EXPORT CertificateReportSender
|
| // Called when a sent report results in an error.
|
| ErrorCallback error_callback_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(CertificateReportSender);
|
| + DISALLOW_COPY_AND_ASSIGN(ReportSender);
|
| };
|
|
|
| } // namespace net
|
|
|
| -#endif // NET_URL_REQUEST_CERTIFICATE_REPORT_H_
|
| +#endif // NET_URL_REQUEST_REPORT_SENDER_H_
|
|
|