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

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

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder initialization in constructor Created 4 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) 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const { 181 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const {
182 return transport_pool_->ConnectionTimeout() + 182 return transport_pool_->ConnectionTimeout() +
183 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds); 183 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
184 } 184 }
185 185
186 SOCKSClientSocketPool::SOCKSClientSocketPool( 186 SOCKSClientSocketPool::SOCKSClientSocketPool(
187 int max_sockets, 187 int max_sockets,
188 int max_sockets_per_group, 188 int max_sockets_per_group,
189 HostResolver* host_resolver, 189 HostResolver* host_resolver,
190 TransportClientSocketPool* transport_pool, 190 TransportClientSocketPool* transport_pool,
191 SocketPerformanceWatcherFactory*,
191 NetLog* net_log) 192 NetLog* net_log)
192 : transport_pool_(transport_pool), 193 : transport_pool_(transport_pool),
193 base_( 194 base_(
194 this, 195 this,
195 max_sockets, 196 max_sockets,
196 max_sockets_per_group, 197 max_sockets_per_group,
197 ClientSocketPool::unused_idle_socket_timeout(), 198 ClientSocketPool::unused_idle_socket_timeout(),
198 ClientSocketPool::used_idle_socket_timeout(), 199 ClientSocketPool::used_idle_socket_timeout(),
199 new SOCKSConnectJobFactory(transport_pool, host_resolver, net_log)) { 200 new SOCKSConnectJobFactory(transport_pool, host_resolver, net_log)) {
200 // We should always have a |transport_pool_| except in unit tests. 201 // We should always have a |transport_pool_| except in unit tests.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 base_.RemoveHigherLayeredPool(higher_pool); 297 base_.RemoveHigherLayeredPool(higher_pool);
297 } 298 }
298 299
299 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 300 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
300 if (base_.CloseOneIdleSocket()) 301 if (base_.CloseOneIdleSocket())
301 return true; 302 return true;
302 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 303 return base_.CloseOneIdleConnectionInHigherLayeredPool();
303 } 304 }
304 305
305 } // namespace net 306 } // 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