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

Side by Side Diff: net/http/http_proxy_client_socket_pool.cc

Issue 8526006: Close idle sockets next time we are about to send data. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: code conventions Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 net_log_); 375 net_log_);
376 } 376 }
377 377
378 HttpProxyClientSocketPool::HttpProxyClientSocketPool( 378 HttpProxyClientSocketPool::HttpProxyClientSocketPool(
379 int max_sockets, 379 int max_sockets,
380 int max_sockets_per_group, 380 int max_sockets_per_group,
381 ClientSocketPoolHistograms* histograms, 381 ClientSocketPoolHistograms* histograms,
382 HostResolver* host_resolver, 382 HostResolver* host_resolver,
383 TransportClientSocketPool* transport_pool, 383 TransportClientSocketPool* transport_pool,
384 SSLClientSocketPool* ssl_pool, 384 SSLClientSocketPool* ssl_pool,
385 NetLog* net_log) 385 NetLog* net_log,
386 const ClientSocketPoolOptions& options)
386 : transport_pool_(transport_pool), 387 : transport_pool_(transport_pool),
387 ssl_pool_(ssl_pool), 388 ssl_pool_(ssl_pool),
388 base_(max_sockets, max_sockets_per_group, histograms, 389 base_(max_sockets, max_sockets_per_group, histograms,
389 ClientSocketPool::unused_idle_socket_timeout(), 390 ClientSocketPool::unused_idle_socket_timeout(),
390 ClientSocketPool::used_idle_socket_timeout(), 391 ClientSocketPool::used_idle_socket_timeout(),
391 new HttpProxyConnectJobFactory(transport_pool, 392 new HttpProxyConnectJobFactory(transport_pool,
392 ssl_pool, 393 ssl_pool,
393 host_resolver, 394 host_resolver,
394 net_log)) {} 395 net_log),
396 options) {}
395 397
396 HttpProxyClientSocketPool::~HttpProxyClientSocketPool() {} 398 HttpProxyClientSocketPool::~HttpProxyClientSocketPool() {}
397 399
398 int HttpProxyClientSocketPool::RequestSocket(const std::string& group_name, 400 int HttpProxyClientSocketPool::RequestSocket(const std::string& group_name,
399 const void* socket_params, 401 const void* socket_params,
400 RequestPriority priority, 402 RequestPriority priority,
401 ClientSocketHandle* handle, 403 ClientSocketHandle* handle,
402 OldCompletionCallback* callback, 404 OldCompletionCallback* callback,
403 const BoundNetLog& net_log) { 405 const BoundNetLog& net_log) {
404 const scoped_refptr<HttpProxySocketParams>* casted_socket_params = 406 const scoped_refptr<HttpProxySocketParams>* casted_socket_params =
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 478
477 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const { 479 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const {
478 return base_.ConnectionTimeout(); 480 return base_.ConnectionTimeout();
479 } 481 }
480 482
481 ClientSocketPoolHistograms* HttpProxyClientSocketPool::histograms() const { 483 ClientSocketPoolHistograms* HttpProxyClientSocketPool::histograms() const {
482 return base_.histograms(); 484 return base_.histograms();
483 } 485 }
484 486
485 } // namespace net 487 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698