Chromium Code Reviews| Index: net/url_request/certificate_report_sender.h |
| diff --git a/net/url_request/certificate_report_sender.h b/net/url_request/certificate_report_sender.h |
| index f77d38e54cfc00f629178c7c5595f92a1ed92eaa..978aa0c4ba8e293feff03d838bd813b1a7d74495 100644 |
| --- a/net/url_request/certificate_report_sender.h |
| +++ b/net/url_request/certificate_report_sender.h |
| @@ -30,6 +30,8 @@ class NET_EXPORT CertificateReportSender |
| : public URLRequest::Delegate, |
| public TransportSecurityState::ReportSender { |
| public: |
| + typedef base::Callback<void(GURL, int)> ErrorCallback; |
|
eroman
2016/04/02 01:55:25
(1) Can use "using" instead
(2) Why not const GURL
estark
2016/04/05 00:57:30
Done.
|
| + |
| // Represents whether or not to send cookies along with reports. |
| enum CookiesPreference { SEND_COOKIES, DO_NOT_SEND_COOKIES }; |
| @@ -46,15 +48,15 @@ class NET_EXPORT CertificateReportSender |
| // CertificateReportSender. When sending a report results in an error, |
| // |error_callback| is called with a pointer to the URLRequest as an |
|
eroman
2016/04/02 01:55:25
Update comment
estark
2016/04/05 00:57:30
Done.
|
| // argument. |
| - CertificateReportSender( |
| - URLRequestContext* request_context, |
| - CookiesPreference cookies_preference, |
| - const base::Callback<void(URLRequest*)>& error_callback); |
| + CertificateReportSender(URLRequestContext* request_context, |
| + CookiesPreference cookies_preference, |
| + const ErrorCallback& error_callback); |
| ~CertificateReportSender() override; |
| // TransportSecurityState::ReportSender implementation. |
| void Send(const GURL& report_uri, const std::string& report) override; |
| + void SetErrorCallback(const ErrorCallback& error_callback) override; |
| // net::URLRequest::Delegate implementation. |
| void OnResponseStarted(URLRequest* request) override; |
| @@ -69,7 +71,7 @@ class NET_EXPORT CertificateReportSender |
| std::set<URLRequest*> inflight_requests_; |
| // Called when a sent report results in an error. |
| - base::Callback<void(URLRequest* request)> error_callback_; |
| + ErrorCallback error_callback_; |
| DISALLOW_COPY_AND_ASSIGN(CertificateReportSender); |
| }; |