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

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

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months 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
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 217
218 int TransportConnectJob::DoTransportConnect() { 218 int TransportConnectJob::DoTransportConnect() {
219 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; 219 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE;
220 transport_socket_.reset(client_socket_factory_->CreateTransportClientSocket( 220 transport_socket_.reset(client_socket_factory_->CreateTransportClientSocket(
221 addresses_, net_log().net_log(), net_log().source())); 221 addresses_, net_log().net_log(), net_log().source()));
222 connect_start_time_ = base::TimeTicks::Now(); 222 connect_start_time_ = base::TimeTicks::Now();
223 int rv = transport_socket_->Connect(&callback_); 223 int rv = transport_socket_->Connect(&callback_);
224 if (rv == ERR_IO_PENDING && 224 if (rv == ERR_IO_PENDING &&
225 AddressListStartsWithIPv6AndHasAnIPv4Addr(addresses_)) { 225 AddressListStartsWithIPv6AndHasAnIPv4Addr(addresses_)) {
226 fallback_timer_.Start(FROM_HERE, 226 fallback_timer_.Start(
227 base::TimeDelta::FromMilliseconds(kIPv6FallbackTimerInMs), 227 base::TimeDelta::FromMilliseconds(kIPv6FallbackTimerInMs),
228 this, &TransportConnectJob::DoIPv6FallbackTransportConnect); 228 this, &TransportConnectJob::DoIPv6FallbackTransportConnect);
229 } 229 }
230 return rv; 230 return rv;
231 } 231 }
232 232
233 int TransportConnectJob::DoTransportConnectComplete(int result) { 233 int TransportConnectJob::DoTransportConnectComplete(int result) {
234 if (result == OK) { 234 if (result == OK) {
235 bool is_ipv4 = addresses_.head()->ai_family != AF_INET6; 235 bool is_ipv4 = addresses_.head()->ai_family != AF_INET6;
236 DCHECK(connect_start_time_ != base::TimeTicks()); 236 DCHECK(connect_start_time_ != base::TimeTicks());
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 482
483 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { 483 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const {
484 return base_.ConnectionTimeout(); 484 return base_.ConnectionTimeout();
485 } 485 }
486 486
487 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { 487 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const {
488 return base_.histograms(); 488 return base_.histograms();
489 } 489 }
490 490
491 } // namespace net 491 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698