Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_HTTP_CERTIFICATE_REPORT_SENDER_IMPL_H_ | |
| 6 #define NET_HTTP_CERTIFICATE_REPORT_SENDER_IMPL_H_ | |
| 7 | |
| 8 #include <set> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "net/http/certificate_report_sender.h" | |
| 13 #include "net/url_request/url_request.h" | |
| 14 | |
| 15 class GURL; | |
| 16 | |
| 17 namespace net { | |
| 18 | |
| 19 class URLRequestContext; | |
| 20 | |
| 21 class NET_EXPORT CertificateReportSenderImpl : public URLRequest::Delegate, | |
|
Ryan Sleevi
2015/06/26 20:03:46
Document
estark
2015/07/07 21:59:29
Done.
| |
| 22 public CertificateReportSender { | |
| 23 public: | |
| 24 CertificateReportSenderImpl(URLRequestContext* request_context, | |
|
Ryan Sleevi
2015/06/26 20:03:46
Document a bit here, including some of the lifetim
estark
2015/07/07 21:59:28
Done.
| |
| 25 CookiesPreference cookies_preference); | |
| 26 ~CertificateReportSenderImpl() override; | |
| 27 | |
| 28 // CertificateReportSender overrides | |
| 29 void Send(const GURL& report_uri, const std::string& report) override; | |
| 30 | |
| 31 // net::URLRequest::Delegate | |
| 32 void OnResponseStarted(URLRequest* request) override; | |
| 33 void OnReadCompleted(URLRequest* request, int bytes_read) override; | |
| 34 | |
| 35 private: | |
| 36 // Creates a URLRequest with which to send a certificate report to the | |
| 37 // server. | |
| 38 virtual scoped_ptr<URLRequest> CreateURLRequest( | |
| 39 net::URLRequestContext* context, | |
| 40 const GURL& report_uri); | |
| 41 | |
| 42 // Performs post-report cleanup. | |
| 43 void RequestComplete(net::URLRequest* request); | |
| 44 | |
| 45 net::URLRequestContext* const request_context_; | |
| 46 | |
| 47 CookiesPreference cookies_preference_; | |
| 48 | |
| 49 // Owns the contained requests. | |
| 50 std::set<URLRequest*> inflight_requests_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(CertificateReportSenderImpl); | |
|
Ryan Sleevi
2015/06/26 20:03:46
include base/macros.h for this
estark
2015/07/07 21:59:29
Done.
| |
| 53 }; | |
| 54 | |
| 55 } // namespace net | |
| 56 | |
| 57 #endif // NET_HTTP_CERTIFICATE_REPORT_SENDER_H_ | |
| OLD | NEW |