Convert raw pointers to scoped_ptr in net module.
[chromium-blink-merge.git] / net / socket / transport_client_socket_pool.cc
bloba5f8adbed24e7e994d30218f33e441b21b120eff
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/socket/transport_client_socket_pool.h"
7 #include <algorithm>
9 #include "base/compiler_specific.h"
10 #include "base/lazy_instance.h"
11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h"
13 #include "base/metrics/histogram.h"
14 #include "base/profiler/scoped_tracker.h"
15 #include "base/strings/string_util.h"
16 #include "base/synchronization/lock.h"
17 #include "base/time/time.h"
18 #include "base/values.h"
19 #include "net/base/ip_endpoint.h"
20 #include "net/base/net_errors.h"
21 #include "net/log/net_log.h"
22 #include "net/socket/client_socket_factory.h"
23 #include "net/socket/client_socket_handle.h"
24 #include "net/socket/client_socket_pool_base.h"
25 #include "net/socket/socket_net_log_params.h"
26 #include "net/socket/tcp_client_socket.h"
28 using base::TimeDelta;
30 namespace net {
32 // TODO(willchan): Base this off RTT instead of statically setting it. Note we
33 // choose a timeout that is different from the backup connect job timer so they
34 // don't synchronize.
35 const int TransportConnectJobHelper::kIPv6FallbackTimerInMs = 300;
37 namespace {
39 // Returns true iff all addresses in |list| are in the IPv6 family.
40 bool AddressListOnlyContainsIPv6(const AddressList& list) {
41 DCHECK(!list.empty());
42 for (AddressList::const_iterator iter = list.begin(); iter != list.end();
43 ++iter) {
44 if (iter->GetFamily() != ADDRESS_FAMILY_IPV6)
45 return false;
47 return true;
50 } // namespace
52 // This lock protects |g_last_connect_time|.
53 static base::LazyInstance<base::Lock>::Leaky
54 g_last_connect_time_lock = LAZY_INSTANCE_INITIALIZER;
56 // |g_last_connect_time| has the last time a connect() call is made.
57 static base::LazyInstance<base::TimeTicks>::Leaky
58 g_last_connect_time = LAZY_INSTANCE_INITIALIZER;
60 TransportSocketParams::TransportSocketParams(
61 const HostPortPair& host_port_pair,
62 bool disable_resolver_cache,
63 bool ignore_limits,
64 const OnHostResolutionCallback& host_resolution_callback,
65 CombineConnectAndWritePolicy combine_connect_and_write_if_supported)
66 : destination_(host_port_pair),
67 ignore_limits_(ignore_limits),
68 host_resolution_callback_(host_resolution_callback),
69 combine_connect_and_write_(combine_connect_and_write_if_supported) {
70 if (disable_resolver_cache)
71 destination_.set_allow_cached_response(false);
72 // combine_connect_and_write currently translates to TCP FastOpen.
73 // Enable TCP FastOpen if user wants it.
74 if (combine_connect_and_write_ == COMBINE_CONNECT_AND_WRITE_DEFAULT) {
75 IsTCPFastOpenUserEnabled() ? combine_connect_and_write_ =
76 COMBINE_CONNECT_AND_WRITE_DESIRED :
77 COMBINE_CONNECT_AND_WRITE_PROHIBITED;
81 TransportSocketParams::~TransportSocketParams() {}
83 // TransportConnectJobs will time out after this many seconds. Note this is
84 // the total time, including both host resolution and TCP connect() times.
86 // TODO(eroman): The use of this constant needs to be re-evaluated. The time
87 // needed for TCPClientSocketXXX::Connect() can be arbitrarily long, since
88 // the address list may contain many alternatives, and most of those may
89 // timeout. Even worse, the per-connect timeout threshold varies greatly
90 // between systems (anywhere from 20 seconds to 190 seconds).
91 // See comment #12 at http://crbug.com/23364 for specifics.
92 static const int kTransportConnectJobTimeoutInSeconds = 240; // 4 minutes.
94 TransportConnectJobHelper::TransportConnectJobHelper(
95 const scoped_refptr<TransportSocketParams>& params,
96 ClientSocketFactory* client_socket_factory,
97 HostResolver* host_resolver,
98 LoadTimingInfo::ConnectTiming* connect_timing)
99 : params_(params),
100 client_socket_factory_(client_socket_factory),
101 resolver_(host_resolver),
102 next_state_(STATE_NONE),
103 connect_timing_(connect_timing) {}
105 TransportConnectJobHelper::~TransportConnectJobHelper() {}
107 int TransportConnectJobHelper::DoResolveHost(RequestPriority priority,
108 const BoundNetLog& net_log) {
109 next_state_ = STATE_RESOLVE_HOST_COMPLETE;
110 connect_timing_->dns_start = base::TimeTicks::Now();
112 return resolver_.Resolve(
113 params_->destination(), priority, &addresses_, on_io_complete_, net_log);
116 int TransportConnectJobHelper::DoResolveHostComplete(
117 int result,
118 const BoundNetLog& net_log) {
119 connect_timing_->dns_end = base::TimeTicks::Now();
120 // Overwrite connection start time, since for connections that do not go
121 // through proxies, |connect_start| should not include dns lookup time.
122 connect_timing_->connect_start = connect_timing_->dns_end;
124 if (result == OK) {
125 // Invoke callback, and abort if it fails.
126 if (!params_->host_resolution_callback().is_null())
127 result = params_->host_resolution_callback().Run(addresses_, net_log);
129 if (result == OK)
130 next_state_ = STATE_TRANSPORT_CONNECT;
132 return result;
135 base::TimeDelta TransportConnectJobHelper::HistogramDuration(
136 ConnectionLatencyHistogram race_result) {
137 DCHECK(!connect_timing_->connect_start.is_null());
138 DCHECK(!connect_timing_->dns_start.is_null());
139 base::TimeTicks now = base::TimeTicks::Now();
140 base::TimeDelta total_duration = now - connect_timing_->dns_start;
141 UMA_HISTOGRAM_CUSTOM_TIMES("Net.DNS_Resolution_And_TCP_Connection_Latency2",
142 total_duration,
143 base::TimeDelta::FromMilliseconds(1),
144 base::TimeDelta::FromMinutes(10),
145 100);
147 base::TimeDelta connect_duration = now - connect_timing_->connect_start;
148 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency",
149 connect_duration,
150 base::TimeDelta::FromMilliseconds(1),
151 base::TimeDelta::FromMinutes(10),
152 100);
154 switch (race_result) {
155 case CONNECTION_LATENCY_IPV4_WINS_RACE:
156 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency_IPv4_Wins_Race",
157 connect_duration,
158 base::TimeDelta::FromMilliseconds(1),
159 base::TimeDelta::FromMinutes(10),
160 100);
161 break;
163 case CONNECTION_LATENCY_IPV4_NO_RACE:
164 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency_IPv4_No_Race",
165 connect_duration,
166 base::TimeDelta::FromMilliseconds(1),
167 base::TimeDelta::FromMinutes(10),
168 100);
169 break;
171 case CONNECTION_LATENCY_IPV6_RACEABLE:
172 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency_IPv6_Raceable",
173 connect_duration,
174 base::TimeDelta::FromMilliseconds(1),
175 base::TimeDelta::FromMinutes(10),
176 100);
177 break;
179 case CONNECTION_LATENCY_IPV6_SOLO:
180 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency_IPv6_Solo",
181 connect_duration,
182 base::TimeDelta::FromMilliseconds(1),
183 base::TimeDelta::FromMinutes(10),
184 100);
185 break;
187 default:
188 NOTREACHED();
189 break;
192 return connect_duration;
195 TransportConnectJob::TransportConnectJob(
196 const std::string& group_name,
197 RequestPriority priority,
198 const scoped_refptr<TransportSocketParams>& params,
199 base::TimeDelta timeout_duration,
200 ClientSocketFactory* client_socket_factory,
201 HostResolver* host_resolver,
202 Delegate* delegate,
203 NetLog* net_log)
204 : ConnectJob(group_name,
205 timeout_duration,
206 priority,
207 delegate,
208 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
209 helper_(params, client_socket_factory, host_resolver, &connect_timing_),
210 interval_between_connects_(CONNECT_INTERVAL_GT_20MS),
211 resolve_result_(OK) {
212 helper_.SetOnIOComplete(this);
215 TransportConnectJob::~TransportConnectJob() {
216 // We don't worry about cancelling the host resolution and TCP connect, since
217 // ~SingleRequestHostResolver and ~StreamSocket will take care of it.
220 LoadState TransportConnectJob::GetLoadState() const {
221 switch (helper_.next_state()) {
222 case TransportConnectJobHelper::STATE_RESOLVE_HOST:
223 case TransportConnectJobHelper::STATE_RESOLVE_HOST_COMPLETE:
224 return LOAD_STATE_RESOLVING_HOST;
225 case TransportConnectJobHelper::STATE_TRANSPORT_CONNECT:
226 case TransportConnectJobHelper::STATE_TRANSPORT_CONNECT_COMPLETE:
227 return LOAD_STATE_CONNECTING;
228 case TransportConnectJobHelper::STATE_NONE:
229 return LOAD_STATE_IDLE;
231 NOTREACHED();
232 return LOAD_STATE_IDLE;
235 void TransportConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) {
236 // If hostname resolution failed, record an empty endpoint and the result.
237 // Also record any attempts made on either of the sockets.
238 ConnectionAttempts attempts;
239 if (resolve_result_ != OK) {
240 DCHECK_EQ(0u, helper_.addresses().size());
241 attempts.push_back(ConnectionAttempt(IPEndPoint(), resolve_result_));
243 attempts.insert(attempts.begin(), connection_attempts_.begin(),
244 connection_attempts_.end());
245 attempts.insert(attempts.begin(), fallback_connection_attempts_.begin(),
246 fallback_connection_attempts_.end());
247 handle->set_connection_attempts(attempts);
250 // static
251 void TransportConnectJob::MakeAddressListStartWithIPv4(AddressList* list) {
252 for (AddressList::iterator i = list->begin(); i != list->end(); ++i) {
253 if (i->GetFamily() == ADDRESS_FAMILY_IPV4) {
254 std::rotate(list->begin(), i, list->end());
255 break;
260 int TransportConnectJob::DoResolveHost() {
261 // TODO(ricea): Remove ScopedTracker below once crbug.com/436634 is fixed.
262 tracked_objects::ScopedTracker tracking_profile(
263 FROM_HERE_WITH_EXPLICIT_FUNCTION(
264 "436634 TransportConnectJob::DoResolveHost"));
266 return helper_.DoResolveHost(priority(), net_log());
269 int TransportConnectJob::DoResolveHostComplete(int result) {
270 resolve_result_ = result;
271 return helper_.DoResolveHostComplete(result, net_log());
274 int TransportConnectJob::DoTransportConnect() {
275 base::TimeTicks now = base::TimeTicks::Now();
276 base::TimeTicks last_connect_time;
278 base::AutoLock lock(g_last_connect_time_lock.Get());
279 last_connect_time = g_last_connect_time.Get();
280 *g_last_connect_time.Pointer() = now;
282 if (last_connect_time.is_null()) {
283 interval_between_connects_ = CONNECT_INTERVAL_GT_20MS;
284 } else {
285 int64 interval = (now - last_connect_time).InMilliseconds();
286 if (interval <= 10)
287 interval_between_connects_ = CONNECT_INTERVAL_LE_10MS;
288 else if (interval <= 20)
289 interval_between_connects_ = CONNECT_INTERVAL_LE_20MS;
290 else
291 interval_between_connects_ = CONNECT_INTERVAL_GT_20MS;
294 helper_.set_next_state(
295 TransportConnectJobHelper::STATE_TRANSPORT_CONNECT_COMPLETE);
296 transport_socket_ =
297 helper_.client_socket_factory()->CreateTransportClientSocket(
298 helper_.addresses(), net_log().net_log(), net_log().source());
300 // If the list contains IPv6 and IPv4 addresses, the first address will
301 // be IPv6, and the IPv4 addresses will be tried as fallback addresses,
302 // per "Happy Eyeballs" (RFC 6555).
303 bool try_ipv6_connect_with_ipv4_fallback =
304 helper_.addresses().front().GetFamily() == ADDRESS_FAMILY_IPV6 &&
305 !AddressListOnlyContainsIPv6(helper_.addresses());
307 // Enable TCP FastOpen if indicated by transport socket params.
308 // Note: We currently do not turn on TCP FastOpen for destinations where
309 // we try a TCP connect over IPv6 with fallback to IPv4.
310 if (!try_ipv6_connect_with_ipv4_fallback &&
311 helper_.params()->combine_connect_and_write() ==
312 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED) {
313 transport_socket_->EnableTCPFastOpenIfSupported();
316 int rv = transport_socket_->Connect(helper_.on_io_complete());
317 if (rv == ERR_IO_PENDING && try_ipv6_connect_with_ipv4_fallback) {
318 fallback_timer_.Start(
319 FROM_HERE,
320 base::TimeDelta::FromMilliseconds(
321 TransportConnectJobHelper::kIPv6FallbackTimerInMs),
322 this,
323 &TransportConnectJob::DoIPv6FallbackTransportConnect);
325 return rv;
328 int TransportConnectJob::DoTransportConnectComplete(int result) {
329 if (result == OK) {
330 // Success will be returned via the main socket, so also include connection
331 // attempts made on the fallback socket up to this point. (Unfortunately,
332 // the only simple way to return information in the success case is through
333 // the successfully-connected socket.)
334 if (fallback_transport_socket_) {
335 ConnectionAttempts fallback_attempts;
336 fallback_transport_socket_->GetConnectionAttempts(&fallback_attempts);
337 transport_socket_->AddConnectionAttempts(fallback_attempts);
340 bool is_ipv4 =
341 helper_.addresses().front().GetFamily() == ADDRESS_FAMILY_IPV4;
342 TransportConnectJobHelper::ConnectionLatencyHistogram race_result =
343 TransportConnectJobHelper::CONNECTION_LATENCY_UNKNOWN;
344 if (is_ipv4) {
345 race_result = TransportConnectJobHelper::CONNECTION_LATENCY_IPV4_NO_RACE;
346 } else {
347 if (AddressListOnlyContainsIPv6(helper_.addresses())) {
348 race_result = TransportConnectJobHelper::CONNECTION_LATENCY_IPV6_SOLO;
349 } else {
350 race_result =
351 TransportConnectJobHelper::CONNECTION_LATENCY_IPV6_RACEABLE;
354 base::TimeDelta connect_duration = helper_.HistogramDuration(race_result);
355 switch (interval_between_connects_) {
356 case CONNECT_INTERVAL_LE_10MS:
357 UMA_HISTOGRAM_CUSTOM_TIMES(
358 "Net.TCP_Connection_Latency_Interval_LessThanOrEqual_10ms",
359 connect_duration,
360 base::TimeDelta::FromMilliseconds(1),
361 base::TimeDelta::FromMinutes(10),
362 100);
363 break;
364 case CONNECT_INTERVAL_LE_20MS:
365 UMA_HISTOGRAM_CUSTOM_TIMES(
366 "Net.TCP_Connection_Latency_Interval_LessThanOrEqual_20ms",
367 connect_duration,
368 base::TimeDelta::FromMilliseconds(1),
369 base::TimeDelta::FromMinutes(10),
370 100);
371 break;
372 case CONNECT_INTERVAL_GT_20MS:
373 UMA_HISTOGRAM_CUSTOM_TIMES(
374 "Net.TCP_Connection_Latency_Interval_GreaterThan_20ms",
375 connect_duration,
376 base::TimeDelta::FromMilliseconds(1),
377 base::TimeDelta::FromMinutes(10),
378 100);
379 break;
380 default:
381 NOTREACHED();
382 break;
385 SetSocket(transport_socket_.Pass());
386 fallback_timer_.Stop();
387 } else {
388 // Failure will be returned via |GetAdditionalErrorState|, so save
389 // connection attempts from both sockets for use there.
390 CopyConnectionAttemptsFromSockets();
392 // Be a bit paranoid and kill off the fallback members to prevent reuse.
393 fallback_transport_socket_.reset();
394 fallback_addresses_.reset();
397 // N.B.: The owner of the ConnectJob will delete it after the callback is
398 // called, so the fallback socket, if any, won't stick around for long.
400 return result;
403 void TransportConnectJob::DoIPv6FallbackTransportConnect() {
404 // The timer should only fire while we're waiting for the main connect to
405 // succeed.
406 if (helper_.next_state() !=
407 TransportConnectJobHelper::STATE_TRANSPORT_CONNECT_COMPLETE) {
408 NOTREACHED();
409 return;
412 DCHECK(!fallback_transport_socket_.get());
413 DCHECK(!fallback_addresses_.get());
415 fallback_addresses_.reset(new AddressList(helper_.addresses()));
416 MakeAddressListStartWithIPv4(fallback_addresses_.get());
417 fallback_transport_socket_ =
418 helper_.client_socket_factory()->CreateTransportClientSocket(
419 *fallback_addresses_, net_log().net_log(), net_log().source());
420 fallback_connect_start_time_ = base::TimeTicks::Now();
421 int rv = fallback_transport_socket_->Connect(
422 base::Bind(
423 &TransportConnectJob::DoIPv6FallbackTransportConnectComplete,
424 base::Unretained(this)));
425 if (rv != ERR_IO_PENDING)
426 DoIPv6FallbackTransportConnectComplete(rv);
429 void TransportConnectJob::DoIPv6FallbackTransportConnectComplete(int result) {
430 // This should only happen when we're waiting for the main connect to succeed.
431 if (helper_.next_state() !=
432 TransportConnectJobHelper::STATE_TRANSPORT_CONNECT_COMPLETE) {
433 NOTREACHED();
434 return;
437 DCHECK_NE(ERR_IO_PENDING, result);
438 DCHECK(fallback_transport_socket_.get());
439 DCHECK(fallback_addresses_.get());
441 if (result == OK) {
442 DCHECK(!fallback_connect_start_time_.is_null());
444 // Success will be returned via the fallback socket, so also include
445 // connection attempts made on the main socket up to this point.
446 // (Unfortunately, the only simple way to return information in the success
447 // case is through the successfully-connected socket.)
448 if (transport_socket_) {
449 ConnectionAttempts attempts;
450 transport_socket_->GetConnectionAttempts(&attempts);
451 fallback_transport_socket_->AddConnectionAttempts(attempts);
454 connect_timing_.connect_start = fallback_connect_start_time_;
455 helper_.HistogramDuration(
456 TransportConnectJobHelper::CONNECTION_LATENCY_IPV4_WINS_RACE);
457 SetSocket(fallback_transport_socket_.Pass());
458 helper_.set_next_state(TransportConnectJobHelper::STATE_NONE);
459 transport_socket_.reset();
460 } else {
461 // Failure will be returned via |GetAdditionalErrorState|, so save
462 // connection attempts from both sockets for use there.
463 CopyConnectionAttemptsFromSockets();
465 // Be a bit paranoid and kill off the fallback members to prevent reuse.
466 fallback_transport_socket_.reset();
467 fallback_addresses_.reset();
470 // N.B.: The owner of the ConnectJob will delete it after the callback is
471 // called, so the main socket, if any, won't stick around for long.
473 NotifyDelegateOfCompletion(result); // Deletes |this|
476 int TransportConnectJob::ConnectInternal() {
477 return helper_.DoConnectInternal(this);
480 void TransportConnectJob::CopyConnectionAttemptsFromSockets() {
481 if (transport_socket_)
482 transport_socket_->GetConnectionAttempts(&connection_attempts_);
483 if (fallback_transport_socket_) {
484 fallback_transport_socket_->GetConnectionAttempts(
485 &fallback_connection_attempts_);
489 scoped_ptr<ConnectJob>
490 TransportClientSocketPool::TransportConnectJobFactory::NewConnectJob(
491 const std::string& group_name,
492 const PoolBase::Request& request,
493 ConnectJob::Delegate* delegate) const {
494 return scoped_ptr<ConnectJob>(
495 new TransportConnectJob(group_name,
496 request.priority(),
497 request.params(),
498 ConnectionTimeout(),
499 client_socket_factory_,
500 host_resolver_,
501 delegate,
502 net_log_));
505 base::TimeDelta
506 TransportClientSocketPool::TransportConnectJobFactory::ConnectionTimeout()
507 const {
508 return base::TimeDelta::FromSeconds(kTransportConnectJobTimeoutInSeconds);
511 TransportClientSocketPool::TransportClientSocketPool(
512 int max_sockets,
513 int max_sockets_per_group,
514 HostResolver* host_resolver,
515 ClientSocketFactory* client_socket_factory,
516 NetLog* net_log)
517 : base_(NULL,
518 max_sockets,
519 max_sockets_per_group,
520 ClientSocketPool::unused_idle_socket_timeout(),
521 ClientSocketPool::used_idle_socket_timeout(),
522 new TransportConnectJobFactory(client_socket_factory,
523 host_resolver,
524 net_log)) {
525 base_.EnableConnectBackupJobs();
528 TransportClientSocketPool::~TransportClientSocketPool() {}
530 int TransportClientSocketPool::RequestSocket(
531 const std::string& group_name,
532 const void* params,
533 RequestPriority priority,
534 ClientSocketHandle* handle,
535 const CompletionCallback& callback,
536 const BoundNetLog& net_log) {
537 const scoped_refptr<TransportSocketParams>* casted_params =
538 static_cast<const scoped_refptr<TransportSocketParams>*>(params);
540 NetLogTcpClientSocketPoolRequestedSocket(net_log, casted_params);
542 return base_.RequestSocket(group_name, *casted_params, priority, handle,
543 callback, net_log);
546 void TransportClientSocketPool::NetLogTcpClientSocketPoolRequestedSocket(
547 const BoundNetLog& net_log,
548 const scoped_refptr<TransportSocketParams>* casted_params) {
549 if (net_log.IsCapturing()) {
550 // TODO(eroman): Split out the host and port parameters.
551 net_log.AddEvent(
552 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET,
553 CreateNetLogHostPortPairCallback(
554 &casted_params->get()->destination().host_port_pair()));
558 void TransportClientSocketPool::RequestSockets(
559 const std::string& group_name,
560 const void* params,
561 int num_sockets,
562 const BoundNetLog& net_log) {
563 const scoped_refptr<TransportSocketParams>* casted_params =
564 static_cast<const scoped_refptr<TransportSocketParams>*>(params);
566 if (net_log.IsCapturing()) {
567 // TODO(eroman): Split out the host and port parameters.
568 net_log.AddEvent(
569 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS,
570 CreateNetLogHostPortPairCallback(
571 &casted_params->get()->destination().host_port_pair()));
574 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
577 void TransportClientSocketPool::CancelRequest(
578 const std::string& group_name,
579 ClientSocketHandle* handle) {
580 base_.CancelRequest(group_name, handle);
583 void TransportClientSocketPool::ReleaseSocket(
584 const std::string& group_name,
585 scoped_ptr<StreamSocket> socket,
586 int id) {
587 base_.ReleaseSocket(group_name, socket.Pass(), id);
590 void TransportClientSocketPool::FlushWithError(int error) {
591 base_.FlushWithError(error);
594 void TransportClientSocketPool::CloseIdleSockets() {
595 base_.CloseIdleSockets();
598 int TransportClientSocketPool::IdleSocketCount() const {
599 return base_.idle_socket_count();
602 int TransportClientSocketPool::IdleSocketCountInGroup(
603 const std::string& group_name) const {
604 return base_.IdleSocketCountInGroup(group_name);
607 LoadState TransportClientSocketPool::GetLoadState(
608 const std::string& group_name, const ClientSocketHandle* handle) const {
609 return base_.GetLoadState(group_name, handle);
612 base::DictionaryValue* TransportClientSocketPool::GetInfoAsValue(
613 const std::string& name,
614 const std::string& type,
615 bool include_nested_pools) const {
616 return base_.GetInfoAsValue(name, type);
619 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const {
620 return base_.ConnectionTimeout();
623 bool TransportClientSocketPool::IsStalled() const {
624 return base_.IsStalled();
627 void TransportClientSocketPool::AddHigherLayeredPool(
628 HigherLayeredPool* higher_pool) {
629 base_.AddHigherLayeredPool(higher_pool);
632 void TransportClientSocketPool::RemoveHigherLayeredPool(
633 HigherLayeredPool* higher_pool) {
634 base_.RemoveHigherLayeredPool(higher_pool);
637 } // namespace net