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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 rv = ERR_FAILED; | 192 rv = ERR_FAILED; |
193 break; | 193 break; |
194 } | 194 } |
195 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); | 195 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); |
196 | 196 |
197 return rv; | 197 return rv; |
198 } | 198 } |
199 | 199 |
200 int TransportConnectJob::DoResolveHost() { | 200 int TransportConnectJob::DoResolveHost() { |
201 next_state_ = STATE_RESOLVE_HOST_COMPLETE; | 201 next_state_ = STATE_RESOLVE_HOST_COMPLETE; |
202 return resolver_.Resolve(params_->destination(), &addresses_, &callback_, | 202 return resolver_.Resolve( |
203 net_log()); | 203 params_->destination(), &addresses_, |
| 204 base::Bind(&TransportConnectJob::OnIOComplete, base::Unretained(this)), |
| 205 net_log()); |
204 } | 206 } |
205 | 207 |
206 int TransportConnectJob::DoResolveHostComplete(int result) { | 208 int TransportConnectJob::DoResolveHostComplete(int result) { |
207 if (result == OK) | 209 if (result == OK) |
208 next_state_ = STATE_TRANSPORT_CONNECT; | 210 next_state_ = STATE_TRANSPORT_CONNECT; |
209 return result; | 211 return result; |
210 } | 212 } |
211 | 213 |
212 int TransportConnectJob::DoTransportConnect() { | 214 int TransportConnectJob::DoTransportConnect() { |
213 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; | 215 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 477 |
476 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { | 478 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { |
477 return base_.ConnectionTimeout(); | 479 return base_.ConnectionTimeout(); |
478 } | 480 } |
479 | 481 |
480 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { | 482 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { |
481 return base_.histograms(); | 483 return base_.histograms(); |
482 } | 484 } |
483 | 485 |
484 } // namespace net | 486 } // namespace net |
OLD | NEW |