| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 const { | 376 const { |
| 377 return base::TimeDelta::FromSeconds(kTransportConnectJobTimeoutInSeconds); | 377 return base::TimeDelta::FromSeconds(kTransportConnectJobTimeoutInSeconds); |
| 378 } | 378 } |
| 379 | 379 |
| 380 TransportClientSocketPool::TransportClientSocketPool( | 380 TransportClientSocketPool::TransportClientSocketPool( |
| 381 int max_sockets, | 381 int max_sockets, |
| 382 int max_sockets_per_group, | 382 int max_sockets_per_group, |
| 383 ClientSocketPoolHistograms* histograms, | 383 ClientSocketPoolHistograms* histograms, |
| 384 HostResolver* host_resolver, | 384 HostResolver* host_resolver, |
| 385 ClientSocketFactory* client_socket_factory, | 385 ClientSocketFactory* client_socket_factory, |
| 386 NetLog* net_log) | 386 NetLog* net_log, |
| 387 const ClientSocketPoolOptions& options) |
| 387 : base_(max_sockets, max_sockets_per_group, histograms, | 388 : base_(max_sockets, max_sockets_per_group, histograms, |
| 388 ClientSocketPool::unused_idle_socket_timeout(), | 389 ClientSocketPool::unused_idle_socket_timeout(), |
| 389 ClientSocketPool::used_idle_socket_timeout(), | 390 ClientSocketPool::used_idle_socket_timeout(), |
| 390 new TransportConnectJobFactory(client_socket_factory, | 391 new TransportConnectJobFactory(client_socket_factory, |
| 391 host_resolver, net_log)) { | 392 host_resolver, net_log), |
| 393 options) { |
| 392 base_.EnableConnectBackupJobs(); | 394 base_.EnableConnectBackupJobs(); |
| 393 } | 395 } |
| 394 | 396 |
| 395 TransportClientSocketPool::~TransportClientSocketPool() {} | 397 TransportClientSocketPool::~TransportClientSocketPool() {} |
| 396 | 398 |
| 397 int TransportClientSocketPool::RequestSocket( | 399 int TransportClientSocketPool::RequestSocket( |
| 398 const std::string& group_name, | 400 const std::string& group_name, |
| 399 const void* params, | 401 const void* params, |
| 400 RequestPriority priority, | 402 RequestPriority priority, |
| 401 ClientSocketHandle* handle, | 403 ClientSocketHandle* handle, |
| (...skipping 79 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 |