OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_ | 5 #ifndef NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_ |
6 #define NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_ | 6 #define NET_URL_REQUEST_CERTIFICATE_REPORT_SENDER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ~CertificateReportSender() override; | 42 ~CertificateReportSender() override; |
43 | 43 |
44 // TransportSecurityState::ReportSender implementation. | 44 // TransportSecurityState::ReportSender implementation. |
45 void Send(const GURL& report_uri, const std::string& report) override; | 45 void Send(const GURL& report_uri, const std::string& report) override; |
46 | 46 |
47 // net::URLRequest::Delegate implementation. | 47 // net::URLRequest::Delegate implementation. |
48 void OnResponseStarted(URLRequest* request) override; | 48 void OnResponseStarted(URLRequest* request) override; |
49 void OnReadCompleted(URLRequest* request, int bytes_read) override; | 49 void OnReadCompleted(URLRequest* request, int bytes_read) override; |
50 | 50 |
51 private: | 51 private: |
52 // Creates a URLRequest with which to send a certificate report to the | |
53 // server. | |
54 // | |
55 // TODO(estark): inline this into Send() once | |
56 // ChromeFraudulentCertificateReporter goes away. | |
57 virtual scoped_ptr<URLRequest> CreateURLRequest( | |
58 net::URLRequestContext* context, | |
59 const GURL& report_uri); | |
60 | |
61 net::URLRequestContext* const request_context_; | 52 net::URLRequestContext* const request_context_; |
62 | 53 |
63 CookiesPreference cookies_preference_; | 54 CookiesPreference cookies_preference_; |
64 | 55 |
65 // Owns the contained requests. | 56 // Owns the contained requests. |
66 std::set<URLRequest*> inflight_requests_; | 57 std::set<URLRequest*> inflight_requests_; |
67 | 58 |
68 DISALLOW_COPY_AND_ASSIGN(CertificateReportSender); | 59 DISALLOW_COPY_AND_ASSIGN(CertificateReportSender); |
69 }; | 60 }; |
70 | 61 |
71 } // namespace net | 62 } // namespace net |
72 | 63 |
73 #endif // NET_URL_REQUEST_CERTIFICATE_REPORT_H_ | 64 #endif // NET_URL_REQUEST_CERTIFICATE_REPORT_H_ |
OLD | NEW |