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

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

Issue 1120007: Disable backup connect jobs for all pools except TCPClientSocketPool (Closed)
Patch Set: Created 10 years, 9 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 TCPClientSocketPool::TCPClientSocketPool( 170 TCPClientSocketPool::TCPClientSocketPool(
171 int max_sockets, 171 int max_sockets,
172 int max_sockets_per_group, 172 int max_sockets_per_group,
173 HostResolver* host_resolver, 173 HostResolver* host_resolver,
174 ClientSocketFactory* client_socket_factory, 174 ClientSocketFactory* client_socket_factory,
175 NetworkChangeNotifier* network_change_notifier) 175 NetworkChangeNotifier* network_change_notifier)
176 : base_(max_sockets, max_sockets_per_group, 176 : base_(max_sockets, max_sockets_per_group,
177 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), 177 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout),
178 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), 178 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout),
179 new TCPConnectJobFactory(client_socket_factory, host_resolver), 179 new TCPConnectJobFactory(client_socket_factory, host_resolver),
180 network_change_notifier) {} 180 network_change_notifier) {
181 base_.enable_backup_jobs();
182 }
181 183
182 TCPClientSocketPool::~TCPClientSocketPool() {} 184 TCPClientSocketPool::~TCPClientSocketPool() {}
183 185
184 int TCPClientSocketPool::RequestSocket( 186 int TCPClientSocketPool::RequestSocket(
185 const std::string& group_name, 187 const std::string& group_name,
186 const void* params, 188 const void* params,
187 RequestPriority priority, 189 RequestPriority priority,
188 ClientSocketHandle* handle, 190 ClientSocketHandle* handle,
189 CompletionCallback* callback, 191 CompletionCallback* callback,
190 const BoundNetLog& net_log) { 192 const BoundNetLog& net_log) {
(...skipping 30 matching lines...) Expand all
221 const std::string& group_name) const { 223 const std::string& group_name) const {
222 return base_.IdleSocketCountInGroup(group_name); 224 return base_.IdleSocketCountInGroup(group_name);
223 } 225 }
224 226
225 LoadState TCPClientSocketPool::GetLoadState( 227 LoadState TCPClientSocketPool::GetLoadState(
226 const std::string& group_name, const ClientSocketHandle* handle) const { 228 const std::string& group_name, const ClientSocketHandle* handle) const {
227 return base_.GetLoadState(group_name, handle); 229 return base_.GetLoadState(group_name, handle);
228 } 230 }
229 231
230 } // namespace net 232 } // 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