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

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

Issue 3191019: A/B experiment for re-establishing TCP connections (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
« 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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