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

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

Issue 1615005: Flush socket pools and SPDY session pool properly on explicit requests and network changes. (Closed)
Patch Set: Fix minor leak. Created 10 years, 8 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/tcp_client_socket_pool.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 base::TimeDelta 169 base::TimeDelta
170 TCPClientSocketPool::TCPConnectJobFactory::ConnectionTimeout() const { 170 TCPClientSocketPool::TCPConnectJobFactory::ConnectionTimeout() const {
171 return base::TimeDelta::FromSeconds(kTCPConnectJobTimeoutInSeconds); 171 return base::TimeDelta::FromSeconds(kTCPConnectJobTimeoutInSeconds);
172 } 172 }
173 173
174 TCPClientSocketPool::TCPClientSocketPool( 174 TCPClientSocketPool::TCPClientSocketPool(
175 int max_sockets, 175 int max_sockets,
176 int max_sockets_per_group, 176 int max_sockets_per_group,
177 const std::string& name, 177 const std::string& name,
178 HostResolver* host_resolver, 178 HostResolver* host_resolver,
179 ClientSocketFactory* client_socket_factory, 179 ClientSocketFactory* client_socket_factory)
180 NetworkChangeNotifier* network_change_notifier)
181 : base_(max_sockets, max_sockets_per_group, name, 180 : base_(max_sockets, max_sockets_per_group, name,
182 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), 181 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout),
183 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), 182 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout),
184 new TCPConnectJobFactory(client_socket_factory, host_resolver), 183 new TCPConnectJobFactory(client_socket_factory, host_resolver)) {
185 network_change_notifier) {
186 base_.enable_backup_jobs(); 184 base_.enable_backup_jobs();
187 } 185 }
188 186
189 TCPClientSocketPool::~TCPClientSocketPool() {} 187 TCPClientSocketPool::~TCPClientSocketPool() {}
190 188
191 int TCPClientSocketPool::RequestSocket( 189 int TCPClientSocketPool::RequestSocket(
192 const std::string& group_name, 190 const std::string& group_name,
193 const void* params, 191 const void* params,
194 RequestPriority priority, 192 RequestPriority priority,
195 ClientSocketHandle* handle, 193 ClientSocketHandle* handle,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const std::string& group_name) const { 226 const std::string& group_name) const {
229 return base_.IdleSocketCountInGroup(group_name); 227 return base_.IdleSocketCountInGroup(group_name);
230 } 228 }
231 229
232 LoadState TCPClientSocketPool::GetLoadState( 230 LoadState TCPClientSocketPool::GetLoadState(
233 const std::string& group_name, const ClientSocketHandle* handle) const { 231 const std::string& group_name, const ClientSocketHandle* handle) const {
234 return base_.GetLoadState(group_name, handle); 232 return base_.GetLoadState(group_name, handle);
235 } 233 }
236 234
237 } // namespace net 235 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_pool.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698