Chromium Code Reviews| Index: net/socket/client_socket_handle.h |
| diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h |
| index 0899d9a9bb067bea3d1c5c67a17dfd9a921bd68e..aa30649bd3a32da78d766113f131302340675de6 100644 |
| --- a/net/socket/client_socket_handle.h |
| +++ b/net/socket/client_socket_handle.h |
| @@ -12,6 +12,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/time/time.h" |
| #include "net/base/completion_callback.h" |
| +#include "net/base/ip_endpoint.h" |
| #include "net/base/load_states.h" |
| #include "net/base/load_timing_info.h" |
| #include "net/base/net_errors.h" |
| @@ -39,6 +40,20 @@ class NET_EXPORT ClientSocketHandle { |
| NUM_TYPES, |
| }; |
| + // A record of a TCP connection attempt made to connect to the host. |
|
Ryan Hamilton
2015/03/24 19:20:19
Can you update the comment to mention TLS errors?
Deprecated (see juliatuttle)
2015/04/08 19:17:19
Done.
|
| + struct ConnectionAttempt { |
| + ConnectionAttempt(const IPEndPoint endpoint, int result) |
| + : endpoint(endpoint), result(result) {} |
| + |
| + // Address and port the socket layer attempted to connect to. |
| + IPEndPoint endpoint; |
| + |
| + // Net error indicating the result of that attempt. |
| + int result; |
| + }; |
| + |
| + typedef std::vector<ConnectionAttempt> ConnectionAttempts; |
| + |
| ClientSocketHandle(); |
| ~ClientSocketHandle(); |
| @@ -136,6 +151,9 @@ class NET_EXPORT ClientSocketHandle { |
| void set_pending_http_proxy_connection(ClientSocketHandle* connection) { |
| pending_http_proxy_connection_.reset(connection); |
| } |
| + void set_connection_attempts(ConnectionAttempts attempts) { |
| + connection_attempts_ = attempts; |
| + } |
| // Only valid if there is no |socket_|. |
| bool is_ssl_error() const { |
| @@ -151,6 +169,9 @@ class NET_EXPORT ClientSocketHandle { |
| ClientSocketHandle* release_pending_http_proxy_connection() { |
| return pending_http_proxy_connection_.release(); |
| } |
| + const ConnectionAttempts& connection_attempts() { |
| + return connection_attempts_; |
| + } |
| StreamSocket* socket() { return socket_.get(); } |
| @@ -200,6 +221,7 @@ class NET_EXPORT ClientSocketHandle { |
| bool is_ssl_error_; |
| HttpResponseInfo ssl_error_response_info_; |
| scoped_ptr<ClientSocketHandle> pending_http_proxy_connection_; |
| + std::vector<ConnectionAttempt> connection_attempts_; |
| base::TimeTicks init_time_; |
| base::TimeDelta setup_time_; |