Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: net/socket/tcp_client_socket_pool.cc

Issue 2077004: Reland my close on idle socket change. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698