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

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

Issue 18796003: When an idle socket is added back to a socket pool, check for stalled jobs in lower pools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update comments Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/transport_client_socket_pool.h ('k') | net/spdy/spdy_session.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/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 return base::TimeDelta::FromSeconds(kTransportConnectJobTimeoutInSeconds); 351 return base::TimeDelta::FromSeconds(kTransportConnectJobTimeoutInSeconds);
352 } 352 }
353 353
354 TransportClientSocketPool::TransportClientSocketPool( 354 TransportClientSocketPool::TransportClientSocketPool(
355 int max_sockets, 355 int max_sockets,
356 int max_sockets_per_group, 356 int max_sockets_per_group,
357 ClientSocketPoolHistograms* histograms, 357 ClientSocketPoolHistograms* histograms,
358 HostResolver* host_resolver, 358 HostResolver* host_resolver,
359 ClientSocketFactory* client_socket_factory, 359 ClientSocketFactory* client_socket_factory,
360 NetLog* net_log) 360 NetLog* net_log)
361 : base_(max_sockets, max_sockets_per_group, histograms, 361 : base_(NULL, max_sockets, max_sockets_per_group, histograms,
362 ClientSocketPool::unused_idle_socket_timeout(), 362 ClientSocketPool::unused_idle_socket_timeout(),
363 ClientSocketPool::used_idle_socket_timeout(), 363 ClientSocketPool::used_idle_socket_timeout(),
364 new TransportConnectJobFactory(client_socket_factory, 364 new TransportConnectJobFactory(client_socket_factory,
365 host_resolver, net_log)) { 365 host_resolver, net_log)) {
366 base_.EnableConnectBackupJobs(); 366 base_.EnableConnectBackupJobs();
367 } 367 }
368 368
369 TransportClientSocketPool::~TransportClientSocketPool() {} 369 TransportClientSocketPool::~TransportClientSocketPool() {}
370 370
371 int TransportClientSocketPool::RequestSocket( 371 int TransportClientSocketPool::RequestSocket(
372 const std::string& group_name, 372 const std::string& group_name,
373 const void* params, 373 const void* params,
374 RequestPriority priority, 374 RequestPriority priority,
375 ClientSocketHandle* handle, 375 ClientSocketHandle* handle,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 const std::string& group_name, 419 const std::string& group_name,
420 scoped_ptr<StreamSocket> socket, 420 scoped_ptr<StreamSocket> socket,
421 int id) { 421 int id) {
422 base_.ReleaseSocket(group_name, socket.Pass(), id); 422 base_.ReleaseSocket(group_name, socket.Pass(), id);
423 } 423 }
424 424
425 void TransportClientSocketPool::FlushWithError(int error) { 425 void TransportClientSocketPool::FlushWithError(int error) {
426 base_.FlushWithError(error); 426 base_.FlushWithError(error);
427 } 427 }
428 428
429 bool TransportClientSocketPool::IsStalled() const {
430 return base_.IsStalled();
431 }
432
433 void TransportClientSocketPool::CloseIdleSockets() { 429 void TransportClientSocketPool::CloseIdleSockets() {
434 base_.CloseIdleSockets(); 430 base_.CloseIdleSockets();
435 } 431 }
436 432
437 int TransportClientSocketPool::IdleSocketCount() const { 433 int TransportClientSocketPool::IdleSocketCount() const {
438 return base_.idle_socket_count(); 434 return base_.idle_socket_count();
439 } 435 }
440 436
441 int TransportClientSocketPool::IdleSocketCountInGroup( 437 int TransportClientSocketPool::IdleSocketCountInGroup(
442 const std::string& group_name) const { 438 const std::string& group_name) const {
443 return base_.IdleSocketCountInGroup(group_name); 439 return base_.IdleSocketCountInGroup(group_name);
444 } 440 }
445 441
446 LoadState TransportClientSocketPool::GetLoadState( 442 LoadState TransportClientSocketPool::GetLoadState(
447 const std::string& group_name, const ClientSocketHandle* handle) const { 443 const std::string& group_name, const ClientSocketHandle* handle) const {
448 return base_.GetLoadState(group_name, handle); 444 return base_.GetLoadState(group_name, handle);
449 } 445 }
450 446
451 void TransportClientSocketPool::AddLayeredPool(LayeredPool* layered_pool) {
452 base_.AddLayeredPool(layered_pool);
453 }
454
455 void TransportClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) {
456 base_.RemoveLayeredPool(layered_pool);
457 }
458
459 base::DictionaryValue* TransportClientSocketPool::GetInfoAsValue( 447 base::DictionaryValue* TransportClientSocketPool::GetInfoAsValue(
460 const std::string& name, 448 const std::string& name,
461 const std::string& type, 449 const std::string& type,
462 bool include_nested_pools) const { 450 bool include_nested_pools) const {
463 return base_.GetInfoAsValue(name, type); 451 return base_.GetInfoAsValue(name, type);
464 } 452 }
465 453
466 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { 454 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const {
467 return base_.ConnectionTimeout(); 455 return base_.ConnectionTimeout();
468 } 456 }
469 457
470 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { 458 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const {
471 return base_.histograms(); 459 return base_.histograms();
472 } 460 }
473 461
462 bool TransportClientSocketPool::IsStalled() const {
463 return base_.IsStalled();
464 }
465
466 void TransportClientSocketPool::AddHigherLayeredPool(
467 HigherLayeredPool* higher_pool) {
468 base_.AddHigherLayeredPool(higher_pool);
469 }
470
471 void TransportClientSocketPool::RemoveHigherLayeredPool(
472 HigherLayeredPool* higher_pool) {
473 base_.RemoveHigherLayeredPool(higher_pool);
474 }
475
474 } // namespace net 476 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698