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

Side by Side Diff: net/socket/socks_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/socks_client_socket_pool.h ('k') | net/socket/socks_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/socks_client_socket_pool.h" 5 #include "net/socket/socks_client_socket_pool.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/socket/client_socket_factory.h" 10 #include "net/socket/client_socket_factory.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const { 154 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const {
155 return tcp_pool_->ConnectionTimeout() + 155 return tcp_pool_->ConnectionTimeout() +
156 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds); 156 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
157 } 157 }
158 158
159 SOCKSClientSocketPool::SOCKSClientSocketPool( 159 SOCKSClientSocketPool::SOCKSClientSocketPool(
160 int max_sockets, 160 int max_sockets,
161 int max_sockets_per_group, 161 int max_sockets_per_group,
162 const std::string& name, 162 const std::string& name,
163 const scoped_refptr<HostResolver>& host_resolver, 163 const scoped_refptr<HostResolver>& host_resolver,
164 const scoped_refptr<TCPClientSocketPool>& tcp_pool, 164 const scoped_refptr<TCPClientSocketPool>& tcp_pool)
165 NetworkChangeNotifier* network_change_notifier)
166 : base_(max_sockets, max_sockets_per_group, name, 165 : base_(max_sockets, max_sockets_per_group, name,
167 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), 166 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout),
168 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), 167 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout),
169 new SOCKSConnectJobFactory(tcp_pool, host_resolver), 168 new SOCKSConnectJobFactory(tcp_pool, host_resolver)) {}
170 network_change_notifier) {}
171 169
172 SOCKSClientSocketPool::~SOCKSClientSocketPool() {} 170 SOCKSClientSocketPool::~SOCKSClientSocketPool() {}
173 171
174 int SOCKSClientSocketPool::RequestSocket( 172 int SOCKSClientSocketPool::RequestSocket(
175 const std::string& group_name, 173 const std::string& group_name,
176 const void* socket_params, 174 const void* socket_params,
177 RequestPriority priority, 175 RequestPriority priority,
178 ClientSocketHandle* handle, 176 ClientSocketHandle* handle,
179 CompletionCallback* callback, 177 CompletionCallback* callback,
180 const BoundNetLog& net_log) { 178 const BoundNetLog& net_log) {
(...skipping 24 matching lines...) Expand all
205 const std::string& group_name) const { 203 const std::string& group_name) const {
206 return base_.IdleSocketCountInGroup(group_name); 204 return base_.IdleSocketCountInGroup(group_name);
207 } 205 }
208 206
209 LoadState SOCKSClientSocketPool::GetLoadState( 207 LoadState SOCKSClientSocketPool::GetLoadState(
210 const std::string& group_name, const ClientSocketHandle* handle) const { 208 const std::string& group_name, const ClientSocketHandle* handle) const {
211 return base_.GetLoadState(group_name, handle); 209 return base_.GetLoadState(group_name, handle);
212 } 210 }
213 211
214 } // namespace net 212 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698