| 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/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 #include "net/socket/client_socket_factory.h" | 8 #include "net/socket/client_socket_factory.h" |
| 9 #include "net/socket/client_socket_handle.h" | 9 #include "net/socket/client_socket_handle.h" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 socks_pool_(socks_pool), | 74 socks_pool_(socks_pool), |
| 75 client_socket_factory_(client_socket_factory), | 75 client_socket_factory_(client_socket_factory), |
| 76 resolver_(host_resolver), | 76 resolver_(host_resolver), |
| 77 ALLOW_THIS_IN_INITIALIZER_LIST( | 77 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 78 callback_(this, &SSLConnectJob::OnIOComplete)) {} | 78 callback_(this, &SSLConnectJob::OnIOComplete)) {} |
| 79 | 79 |
| 80 SSLConnectJob::~SSLConnectJob() {} | 80 SSLConnectJob::~SSLConnectJob() {} |
| 81 | 81 |
| 82 LoadState SSLConnectJob::GetLoadState() const { | 82 LoadState SSLConnectJob::GetLoadState() const { |
| 83 switch (next_state_) { | 83 switch (next_state_) { |
| 84 case STATE_TUNNEL_CONNECT_COMPLETE: |
| 85 if (transport_socket_handle_->socket()) |
| 86 return LOAD_STATE_ESTABLISHING_PROXY_TUNNEL; |
| 87 // else, fall through. |
| 84 case STATE_TCP_CONNECT: | 88 case STATE_TCP_CONNECT: |
| 85 case STATE_TCP_CONNECT_COMPLETE: | 89 case STATE_TCP_CONNECT_COMPLETE: |
| 86 case STATE_SOCKS_CONNECT: | 90 case STATE_SOCKS_CONNECT: |
| 87 case STATE_SOCKS_CONNECT_COMPLETE: | 91 case STATE_SOCKS_CONNECT_COMPLETE: |
| 88 case STATE_TUNNEL_CONNECT: | 92 case STATE_TUNNEL_CONNECT: |
| 89 case STATE_TUNNEL_CONNECT_COMPLETE: | |
| 90 return transport_socket_handle_->GetLoadState(); | 93 return transport_socket_handle_->GetLoadState(); |
| 91 case STATE_SSL_CONNECT: | 94 case STATE_SSL_CONNECT: |
| 92 case STATE_SSL_CONNECT_COMPLETE: | 95 case STATE_SSL_CONNECT_COMPLETE: |
| 93 return LOAD_STATE_SSL_HANDSHAKE; | 96 return LOAD_STATE_SSL_HANDSHAKE; |
| 94 default: | 97 default: |
| 95 NOTREACHED(); | 98 NOTREACHED(); |
| 96 return LOAD_STATE_IDLE; | 99 return LOAD_STATE_IDLE; |
| 97 } | 100 } |
| 98 } | 101 } |
| 99 | 102 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 const std::string& group_name) const { | 417 const std::string& group_name) const { |
| 415 return base_.IdleSocketCountInGroup(group_name); | 418 return base_.IdleSocketCountInGroup(group_name); |
| 416 } | 419 } |
| 417 | 420 |
| 418 LoadState SSLClientSocketPool::GetLoadState( | 421 LoadState SSLClientSocketPool::GetLoadState( |
| 419 const std::string& group_name, const ClientSocketHandle* handle) const { | 422 const std::string& group_name, const ClientSocketHandle* handle) const { |
| 420 return base_.GetLoadState(group_name, handle); | 423 return base_.GetLoadState(group_name, handle); |
| 421 } | 424 } |
| 422 | 425 |
| 423 } // namespace net | 426 } // namespace net |
| OLD | NEW |