| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| 6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 // On an ERR_PROXY_AUTH_REQUESTED error, the |headers| and |auth_challenge| | 150 // On an ERR_PROXY_AUTH_REQUESTED error, the |headers| and |auth_challenge| |
| 151 // fields are filled in. On an ERR_SSL_CLIENT_AUTH_CERT_NEEDED error, | 151 // fields are filled in. On an ERR_SSL_CLIENT_AUTH_CERT_NEEDED error, |
| 152 // the |cert_request_info| field is set. | 152 // the |cert_request_info| field is set. |
| 153 const HttpResponseInfo& ssl_error_response_info() const { | 153 const HttpResponseInfo& ssl_error_response_info() const { |
| 154 return ssl_error_response_info_; | 154 return ssl_error_response_info_; |
| 155 } | 155 } |
| 156 ClientSocketHandle* release_pending_http_proxy_connection() { | 156 ClientSocketHandle* release_pending_http_proxy_connection() { |
| 157 return pending_http_proxy_connection_.release(); | 157 return pending_http_proxy_connection_.release(); |
| 158 } | 158 } |
| 159 // If the connection failed, returns the connection attempts made. (If it |
| 160 // succeeded, they will be returned through the socket instead; see |
| 161 // |StreamSocket::GetConnectionAttempts|.) |
| 159 const ConnectionAttempts& connection_attempts() { | 162 const ConnectionAttempts& connection_attempts() { |
| 160 return connection_attempts_; | 163 return connection_attempts_; |
| 161 } | 164 } |
| 162 | 165 |
| 163 StreamSocket* socket() { return socket_.get(); } | 166 StreamSocket* socket() { return socket_.get(); } |
| 164 | 167 |
| 165 // SetSocket() must be called with a new socket before this handle | 168 // SetSocket() must be called with a new socket before this handle |
| 166 // is destroyed if is_initialized() is true. | 169 // is destroyed if is_initialized() is true. |
| 167 scoped_ptr<StreamSocket> PassSocket(); | 170 scoped_ptr<StreamSocket> PassSocket(); |
| 168 | 171 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 user_callback_ = callback; | 246 user_callback_ = callback; |
| 244 } else { | 247 } else { |
| 245 HandleInitCompletion(rv); | 248 HandleInitCompletion(rv); |
| 246 } | 249 } |
| 247 return rv; | 250 return rv; |
| 248 } | 251 } |
| 249 | 252 |
| 250 } // namespace net | 253 } // namespace net |
| 251 | 254 |
| 252 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ | 255 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ |
| OLD | NEW |