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 #include "net/http/http_stream_request.h" | 5 #include "net/http/http_stream_request.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 const HttpResponseInfo& response, | 199 const HttpResponseInfo& response, |
200 HttpAuthController* auth_controller) { | 200 HttpAuthController* auth_controller) { |
201 delegate_->OnNeedsProxyAuth(response, auth_controller); | 201 delegate_->OnNeedsProxyAuth(response, auth_controller); |
202 } | 202 } |
203 | 203 |
204 void HttpStreamRequest::OnNeedsClientAuthCallback( | 204 void HttpStreamRequest::OnNeedsClientAuthCallback( |
205 SSLCertRequestInfo* cert_info) { | 205 SSLCertRequestInfo* cert_info) { |
206 delegate_->OnNeedsClientAuth(cert_info); | 206 delegate_->OnNeedsClientAuth(cert_info); |
207 } | 207 } |
208 | 208 |
| 209 void HttpStreamRequest::OnNeedsTLSLoginCallback( |
| 210 AuthChallengeInfo* login_info) { |
| 211 delegate_->OnNeedsTLSLogin(login_info); |
| 212 } |
| 213 |
209 void HttpStreamRequest::OnHttpsProxyTunnelResponseCallback( | 214 void HttpStreamRequest::OnHttpsProxyTunnelResponseCallback( |
210 const HttpResponseInfo& response_info, | 215 const HttpResponseInfo& response_info, |
211 HttpStream* stream) { | 216 HttpStream* stream) { |
212 delegate_->OnHttpsProxyTunnelResponse(response_info, stream); | 217 delegate_->OnHttpsProxyTunnelResponse(response_info, stream); |
213 } | 218 } |
214 | 219 |
215 void HttpStreamRequest::OnPreconnectsComplete(int result) { | 220 void HttpStreamRequest::OnPreconnectsComplete(int result) { |
216 preconnect_delegate_->OnPreconnectsComplete(this, result); | 221 preconnect_delegate_->OnPreconnectsComplete(this, result); |
217 } | 222 } |
218 | 223 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 return ERR_IO_PENDING; | 277 return ERR_IO_PENDING; |
273 | 278 |
274 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED: | 279 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED: |
275 MessageLoop::current()->PostTask( | 280 MessageLoop::current()->PostTask( |
276 FROM_HERE, | 281 FROM_HERE, |
277 method_factory_.NewRunnableMethod( | 282 method_factory_.NewRunnableMethod( |
278 &HttpStreamRequest::OnNeedsClientAuthCallback, | 283 &HttpStreamRequest::OnNeedsClientAuthCallback, |
279 connection_->ssl_error_response_info().cert_request_info)); | 284 connection_->ssl_error_response_info().cert_request_info)); |
280 return ERR_IO_PENDING; | 285 return ERR_IO_PENDING; |
281 | 286 |
| 287 case ERR_TLS_CLIENT_LOGIN_NEEDED: |
| 288 MessageLoop::current()->PostTask( |
| 289 FROM_HERE, |
| 290 method_factory_.NewRunnableMethod( |
| 291 &HttpStreamRequest::OnNeedsTLSLoginCallback, |
| 292 connection_->ssl_error_response_info().login_request_info)); |
| 293 return ERR_TLS_CLIENT_LOGIN_NEEDED; |
| 294 |
282 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: | 295 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: |
283 { | 296 { |
284 DCHECK(connection_.get()); | 297 DCHECK(connection_.get()); |
285 DCHECK(connection_->socket()); | 298 DCHECK(connection_->socket()); |
286 DCHECK(establishing_tunnel_); | 299 DCHECK(establishing_tunnel_); |
287 | 300 |
288 ProxyClientSocket* proxy_socket = | 301 ProxyClientSocket* proxy_socket = |
289 static_cast<ProxyClientSocket*>(connection_->socket()); | 302 static_cast<ProxyClientSocket*>(connection_->socket()); |
290 MessageLoop::current()->PostTask( | 303 MessageLoop::current()->PostTask( |
291 FROM_HERE, | 304 FROM_HERE, |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 base::TimeDelta::FromMinutes(6), | 1109 base::TimeDelta::FromMinutes(6), |
1097 100); | 1110 100); |
1098 break; | 1111 break; |
1099 default: | 1112 default: |
1100 NOTREACHED(); | 1113 NOTREACHED(); |
1101 break; | 1114 break; |
1102 } | 1115 } |
1103 } | 1116 } |
1104 | 1117 |
1105 } // namespace net | 1118 } // namespace net |
OLD | NEW |