OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const scoped_refptr<ClientSocketPoolHistograms>& histograms, | 195 const scoped_refptr<ClientSocketPoolHistograms>& histograms, |
196 HostResolver* host_resolver, | 196 HostResolver* host_resolver, |
197 ClientSocketFactory* client_socket_factory, | 197 ClientSocketFactory* client_socket_factory, |
198 NetLog* net_log) | 198 NetLog* net_log) |
199 : base_(max_sockets, max_sockets_per_group, histograms, | 199 : base_(max_sockets, max_sockets_per_group, histograms, |
200 base::TimeDelta::FromSeconds( | 200 base::TimeDelta::FromSeconds( |
201 ClientSocketPool::unused_idle_socket_timeout()), | 201 ClientSocketPool::unused_idle_socket_timeout()), |
202 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), | 202 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), |
203 new TCPConnectJobFactory(client_socket_factory, | 203 new TCPConnectJobFactory(client_socket_factory, |
204 host_resolver, net_log)) { | 204 host_resolver, net_log)) { |
205 base_.EnableBackupJobs(); | 205 base_.EnableConnectBackupJobs(); |
206 } | 206 } |
207 | 207 |
208 TCPClientSocketPool::~TCPClientSocketPool() {} | 208 TCPClientSocketPool::~TCPClientSocketPool() {} |
209 | 209 |
210 int TCPClientSocketPool::RequestSocket( | 210 int TCPClientSocketPool::RequestSocket( |
211 const std::string& group_name, | 211 const std::string& group_name, |
212 const void* params, | 212 const void* params, |
213 RequestPriority priority, | 213 RequestPriority priority, |
214 ClientSocketHandle* handle, | 214 ClientSocketHandle* handle, |
215 CompletionCallback* callback, | 215 CompletionCallback* callback, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 const std::string& group_name) const { | 257 const std::string& group_name) const { |
258 return base_.IdleSocketCountInGroup(group_name); | 258 return base_.IdleSocketCountInGroup(group_name); |
259 } | 259 } |
260 | 260 |
261 LoadState TCPClientSocketPool::GetLoadState( | 261 LoadState TCPClientSocketPool::GetLoadState( |
262 const std::string& group_name, const ClientSocketHandle* handle) const { | 262 const std::string& group_name, const ClientSocketHandle* handle) const { |
263 return base_.GetLoadState(group_name, handle); | 263 return base_.GetLoadState(group_name, handle); |
264 } | 264 } |
265 | 265 |
266 } // namespace net | 266 } // namespace net |
OLD | NEW |