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

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

Issue 2533063002: Fix Net.Socket.IdleSocketTimeSaving histogram (Closed)
Patch Set: self review Created 4 years 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CancelRequest(const std::string& group_name, 239 void SOCKSClientSocketPool::CancelRequest(const std::string& group_name,
240 ClientSocketHandle* handle) { 240 ClientSocketHandle* handle) {
241 base_.CancelRequest(group_name, handle); 241 base_.CancelRequest(group_name, handle);
242 } 242 }
243 243
244 void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, 244 void SOCKSClientSocketPool::ReleaseSocket(
245 std::unique_ptr<StreamSocket> socket, 245 const std::string& group_name,
246 int id) { 246 std::unique_ptr<StreamSocket> socket,
247 base_.ReleaseSocket(group_name, std::move(socket), id); 247 int id,
248 const LoadTimingInfo::ConnectTiming& connect_timing) {
249 base_.ReleaseSocket(group_name, std::move(socket), id, connect_timing);
248 } 250 }
249 251
250 void SOCKSClientSocketPool::FlushWithError(int error) { 252 void SOCKSClientSocketPool::FlushWithError(int error) {
251 base_.FlushWithError(error); 253 base_.FlushWithError(error);
252 } 254 }
253 255
254 void SOCKSClientSocketPool::CloseIdleSockets() { 256 void SOCKSClientSocketPool::CloseIdleSockets() {
255 base_.CloseIdleSockets(); 257 base_.CloseIdleSockets();
256 } 258 }
257 259
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 base_.RemoveHigherLayeredPool(higher_pool); 304 base_.RemoveHigherLayeredPool(higher_pool);
303 } 305 }
304 306
305 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 307 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
306 if (base_.CloseOneIdleSocket()) 308 if (base_.CloseOneIdleSocket())
307 return true; 309 return true;
308 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 310 return base_.CloseOneIdleConnectionInHigherLayeredPool();
309 } 311 }
310 312
311 } // namespace net 313 } // 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