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

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

Issue 1898133002: Add reprioritization to socket pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated comments. Created 3 years, 10 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/ssl_client_socket_pool.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void SOCKSClientSocketPool::RequestSockets(const std::string& group_name, 229 void SOCKSClientSocketPool::RequestSockets(const std::string& group_name,
230 const void* params, 230 const void* params,
231 int num_sockets, 231 int num_sockets,
232 const NetLogWithSource& net_log) { 232 const NetLogWithSource& net_log) {
233 const scoped_refptr<SOCKSSocketParams>* casted_params = 233 const scoped_refptr<SOCKSSocketParams>* casted_params =
234 static_cast<const scoped_refptr<SOCKSSocketParams>*>(params); 234 static_cast<const scoped_refptr<SOCKSSocketParams>*>(params);
235 235
236 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); 236 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
237 } 237 }
238 238
239 void SOCKSClientSocketPool::SetPriority(const std::string& group_name,
240 ClientSocketHandle* handle,
241 RequestPriority priority) {
242 base_.SetPriority(group_name, handle, priority);
243 }
244
239 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name, 245 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name,
240 ClientSocketHandle* handle) { 246 ClientSocketHandle* handle) {
241 base_.CancelRequest(group_name, handle); 247 base_.CancelRequest(group_name, handle);
242 } 248 }
243 249
244 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, 250 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name,
245 std::unique_ptr<StreamSocket> socket, 251 std::unique_ptr<StreamSocket> socket,
246 int id) { 252 int id) {
247 base_.ReleaseSocket(group_name, std::move(socket), id); 253 base_.ReleaseSocket(group_name, std::move(socket), id);
248 } 254 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 base_.RemoveHigherLayeredPool(higher_pool); 308 base_.RemoveHigherLayeredPool(higher_pool);
303 } 309 }
304 310
305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 311 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
306 if (base_.CloseOneIdleSocket()) 312 if (base_.CloseOneIdleSocket())
307 return true; 313 return true;
308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 314 return base_.CloseOneIdleConnectionInHigherLayeredPool();
309 } 315 }
310 316
311 } // namespace net 317 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698