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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 TCPClientSocketPool::TCPClientSocketPool( | 175 TCPClientSocketPool::TCPClientSocketPool( |
176 int max_sockets, | 176 int max_sockets, |
177 int max_sockets_per_group, | 177 int max_sockets_per_group, |
178 const std::string& name, | 178 const std::string& name, |
179 HostResolver* host_resolver, | 179 HostResolver* host_resolver, |
180 ClientSocketFactory* client_socket_factory) | 180 ClientSocketFactory* client_socket_factory) |
181 : base_(max_sockets, max_sockets_per_group, name, | 181 : base_(max_sockets, max_sockets_per_group, name, |
182 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), | 182 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), |
183 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), | 183 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), |
184 new TCPConnectJobFactory(client_socket_factory, host_resolver)) { | 184 new TCPConnectJobFactory(client_socket_factory, host_resolver)) { |
185 base_.enable_backup_jobs(); | 185 base_.EnableBackupJobs(); |
186 } | 186 } |
187 | 187 |
188 TCPClientSocketPool::~TCPClientSocketPool() {} | 188 TCPClientSocketPool::~TCPClientSocketPool() {} |
189 | 189 |
190 int TCPClientSocketPool::RequestSocket( | 190 int TCPClientSocketPool::RequestSocket( |
191 const std::string& group_name, | 191 const std::string& group_name, |
192 const void* params, | 192 const void* params, |
193 RequestPriority priority, | 193 RequestPriority priority, |
194 ClientSocketHandle* handle, | 194 ClientSocketHandle* handle, |
195 CompletionCallback* callback, | 195 CompletionCallback* callback, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 const std::string& group_name) const { | 232 const std::string& group_name) const { |
233 return base_.IdleSocketCountInGroup(group_name); | 233 return base_.IdleSocketCountInGroup(group_name); |
234 } | 234 } |
235 | 235 |
236 LoadState TCPClientSocketPool::GetLoadState( | 236 LoadState TCPClientSocketPool::GetLoadState( |
237 const std::string& group_name, const ClientSocketHandle* handle) const { | 237 const std::string& group_name, const ClientSocketHandle* handle) const { |
238 return base_.GetLoadState(group_name, handle); | 238 return base_.GetLoadState(group_name, handle); |
239 } | 239 } |
240 | 240 |
241 } // namespace net | 241 } // namespace net |
OLD | NEW |