| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tcp_client_socket_pool.h" | 5 #include "net/socket/tcp_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/time.h" | 10 #include "base/time.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 base::TimeDelta::FromSeconds(kTCPConnectJobTimeoutInSeconds), | 139 base::TimeDelta::FromSeconds(kTCPConnectJobTimeoutInSeconds), |
| 140 client_socket_factory_, host_resolver_, delegate, load_log); | 140 client_socket_factory_, host_resolver_, delegate, load_log); |
| 141 } | 141 } |
| 142 | 142 |
| 143 TCPClientSocketPool::TCPClientSocketPool( | 143 TCPClientSocketPool::TCPClientSocketPool( |
| 144 int max_sockets, | 144 int max_sockets, |
| 145 int max_sockets_per_group, | 145 int max_sockets_per_group, |
| 146 HostResolver* host_resolver, | 146 HostResolver* host_resolver, |
| 147 ClientSocketFactory* client_socket_factory) | 147 ClientSocketFactory* client_socket_factory) |
| 148 : base_(max_sockets, max_sockets_per_group, | 148 : base_(max_sockets, max_sockets_per_group, |
| 149 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), |
| 150 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), |
| 149 new TCPConnectJobFactory(client_socket_factory, host_resolver)) {} | 151 new TCPConnectJobFactory(client_socket_factory, host_resolver)) {} |
| 150 | 152 |
| 151 TCPClientSocketPool::~TCPClientSocketPool() {} | 153 TCPClientSocketPool::~TCPClientSocketPool() {} |
| 152 | 154 |
| 153 int TCPClientSocketPool::RequestSocket( | 155 int TCPClientSocketPool::RequestSocket( |
| 154 const std::string& group_name, | 156 const std::string& group_name, |
| 155 const void* resolve_info, | 157 const void* resolve_info, |
| 156 int priority, | 158 int priority, |
| 157 ClientSocketHandle* handle, | 159 ClientSocketHandle* handle, |
| 158 CompletionCallback* callback, | 160 CompletionCallback* callback, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 183 const std::string& group_name) const { | 185 const std::string& group_name) const { |
| 184 return base_.IdleSocketCountInGroup(group_name); | 186 return base_.IdleSocketCountInGroup(group_name); |
| 185 } | 187 } |
| 186 | 188 |
| 187 LoadState TCPClientSocketPool::GetLoadState( | 189 LoadState TCPClientSocketPool::GetLoadState( |
| 188 const std::string& group_name, const ClientSocketHandle* handle) const { | 190 const std::string& group_name, const ClientSocketHandle* handle) const { |
| 189 return base_.GetLoadState(group_name, handle); | 191 return base_.GetLoadState(group_name, handle); |
| 190 } | 192 } |
| 191 | 193 |
| 192 } // namespace net | 194 } // namespace net |
| OLD | NEW |