Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: net/socket/transport_client_socket_pool.cc

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket/transport_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698