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

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

Issue 2678353003: Close idle H2 sockets when SpdySession is initialized. (Closed)
Patch Set: Address comments to hook directly to ClientSocketHandle Created 3 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/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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 void SOCKSClientSocketPool::FlushWithError(int error) { 256 void SOCKSClientSocketPool::FlushWithError(int error) {
257 base_.FlushWithError(error); 257 base_.FlushWithError(error);
258 } 258 }
259 259
260 void SOCKSClientSocketPool::CloseIdleSockets() { 260 void SOCKSClientSocketPool::CloseIdleSockets() {
261 base_.CloseIdleSockets(); 261 base_.CloseIdleSockets();
262 } 262 }
263 263
264 void SOCKSClientSocketPool::CloseIdleSocketsInGroup(
265 const std::string& group_name) {
266 base_.CloseIdleSocketsInGroup(group_name);
267 }
268
264 int SOCKSClientSocketPool::IdleSocketCount() const { 269 int SOCKSClientSocketPool::IdleSocketCount() const {
265 return base_.idle_socket_count(); 270 return base_.idle_socket_count();
266 } 271 }
267 272
268 int SOCKSClientSocketPool::IdleSocketCountInGroup( 273 int SOCKSClientSocketPool::IdleSocketCountInGroup(
269 const std::string& group_name) const { 274 const std::string& group_name) const {
270 return base_.IdleSocketCountInGroup(group_name); 275 return base_.IdleSocketCountInGroup(group_name);
271 } 276 }
272 277
273 LoadState SOCKSClientSocketPool::GetLoadState( 278 LoadState SOCKSClientSocketPool::GetLoadState(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 base_.RemoveHigherLayeredPool(higher_pool); 313 base_.RemoveHigherLayeredPool(higher_pool);
309 } 314 }
310 315
311 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 316 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
312 if (base_.CloseOneIdleSocket()) 317 if (base_.CloseOneIdleSocket())
313 return true; 318 return true;
314 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 319 return base_.CloseOneIdleConnectionInHigherLayeredPool();
315 } 320 }
316 321
317 } // namespace net 322 } // 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