OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HTTP_STREAM_FACTORY_H_ | 5 #ifndef NET_HTTP_STREAM_FACTORY_H_ |
6 #define NET_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // to |auth_controller| if it is needed beyond the lifetime of this | 62 // to |auth_controller| if it is needed beyond the lifetime of this |
63 // callback. | 63 // callback. |
64 virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response, | 64 virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response, |
65 HttpAuthController* auth_controller) = 0; | 65 HttpAuthController* auth_controller) = 0; |
66 | 66 |
67 // This is the failure for SSL Client Auth | 67 // This is the failure for SSL Client Auth |
68 // Ownership of |cert_info| is retained by the StreamRequest. The delegate | 68 // Ownership of |cert_info| is retained by the StreamRequest. The delegate |
69 // may take a reference if it needs the cert_info beyond the lifetime of | 69 // may take a reference if it needs the cert_info beyond the lifetime of |
70 // this callback. | 70 // this callback. |
71 virtual void OnNeedsClientAuth(SSLCertRequestInfo* cert_info) = 0; | 71 virtual void OnNeedsClientAuth(SSLCertRequestInfo* cert_info) = 0; |
| 72 |
| 73 // This is the failure of the CONNECT request through an HTTPS proxy. |
| 74 // Headers can be read from |response_info|, while the body can be read |
| 75 // from |stream|. |
| 76 // Ownership of |stream| is transferred to the delegate. |
| 77 virtual void OnHttpsProxyTunnelResponse( |
| 78 const HttpResponseInfo& response_info, HttpStream* stream) = 0; |
72 }; | 79 }; |
73 | 80 |
74 virtual ~StreamRequest() {} | 81 virtual ~StreamRequest() {} |
75 | 82 |
76 // When a HttpStream creation process requires a SSL Certificate, | 83 // When a HttpStream creation process requires a SSL Certificate, |
77 // the delegate OnNeedsClientAuth handler will have been called. | 84 // the delegate OnNeedsClientAuth handler will have been called. |
78 // It now becomes the delegate's responsibility to collect the certificate | 85 // It now becomes the delegate's responsibility to collect the certificate |
79 // (probably from the user), and then call this method to resume | 86 // (probably from the user), and then call this method to resume |
80 // the HttpStream creation process. | 87 // the HttpStream creation process. |
81 // Ownership of |client_cert| remains with the StreamRequest. The | 88 // Ownership of |client_cert| remains with the StreamRequest. The |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 const std::string& alternate_protocol_str, | 147 const std::string& alternate_protocol_str, |
141 const HostPortPair& http_host_port_pair) = 0; | 148 const HostPortPair& http_host_port_pair) = 0; |
142 | 149 |
143 virtual GURL ApplyHostMappingRules(const GURL& url, | 150 virtual GURL ApplyHostMappingRules(const GURL& url, |
144 HostPortPair* endpoint) = 0; | 151 HostPortPair* endpoint) = 0; |
145 }; | 152 }; |
146 | 153 |
147 } // namespace net | 154 } // namespace net |
148 | 155 |
149 #endif // NET_HTTP_STREAM_FACTORY_H_ | 156 #endif // NET_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |