| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/transport_client_socket_pool.h" | 5 #include "net/socket/transport_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 rv = ERR_FAILED; | 198 rv = ERR_FAILED; |
| 199 break; | 199 break; |
| 200 } | 200 } |
| 201 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); | 201 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); |
| 202 | 202 |
| 203 return rv; | 203 return rv; |
| 204 } | 204 } |
| 205 | 205 |
| 206 int TransportConnectJob::DoResolveHost() { | 206 int TransportConnectJob::DoResolveHost() { |
| 207 next_state_ = STATE_RESOLVE_HOST_COMPLETE; | 207 next_state_ = STATE_RESOLVE_HOST_COMPLETE; |
| 208 return resolver_.Resolve(params_->destination(), &addresses_, &callback_, | 208 return resolver_.Resolve( |
| 209 net_log()); | 209 params_->destination(), &addresses_, |
| 210 base::Bind(&TransportConnectJob::OnIOComplete, base::Unretained(this)), |
| 211 net_log()); |
| 210 } | 212 } |
| 211 | 213 |
| 212 int TransportConnectJob::DoResolveHostComplete(int result) { | 214 int TransportConnectJob::DoResolveHostComplete(int result) { |
| 213 if (result == OK) | 215 if (result == OK) |
| 214 next_state_ = STATE_TRANSPORT_CONNECT; | 216 next_state_ = STATE_TRANSPORT_CONNECT; |
| 215 return result; | 217 return result; |
| 216 } | 218 } |
| 217 | 219 |
| 218 int TransportConnectJob::DoTransportConnect() { | 220 int TransportConnectJob::DoTransportConnect() { |
| 219 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; | 221 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 483 |
| 482 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { | 484 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { |
| 483 return base_.ConnectionTimeout(); | 485 return base_.ConnectionTimeout(); |
| 484 } | 486 } |
| 485 | 487 |
| 486 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { | 488 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { |
| 487 return base_.histograms(); | 489 return base_.histograms(); |
| 488 } | 490 } |
| 489 | 491 |
| 490 } // namespace net | 492 } // namespace net |
| OLD | NEW |