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

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

Issue 1898133002: Add reprioritization to socket pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumbed SetPriority down from HttpStreamFactoryImpl::Job. 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // TODO(eroman): Split out the host and port parameters. 583 // TODO(eroman): Split out the host and port parameters.
584 net_log.AddEvent( 584 net_log.AddEvent(
585 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS, 585 NetLog::TYPE_TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS,
586 CreateNetLogHostPortPairCallback( 586 CreateNetLogHostPortPairCallback(
587 &casted_params->get()->destination().host_port_pair())); 587 &casted_params->get()->destination().host_port_pair()));
588 } 588 }
589 589
590 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log); 590 base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
591 } 591 }
592 592
593 void TransportClientSocketPool::SetPriority(const std::string& group_name,
594 ClientSocketHandle* handle,
595 RequestPriority priority) {
596 base_.SetPriority(group_name, handle, priority);
597 }
598
593 void TransportClientSocketPool::CancelRequest( 599 void TransportClientSocketPool::CancelRequest(
594 const std::string& group_name, 600 const std::string& group_name,
595 ClientSocketHandle* handle) { 601 ClientSocketHandle* handle) {
596 base_.CancelRequest(group_name, handle); 602 base_.CancelRequest(group_name, handle);
597 } 603 }
598 604
599 void TransportClientSocketPool::ReleaseSocket( 605 void TransportClientSocketPool::ReleaseSocket(
600 const std::string& group_name, 606 const std::string& group_name,
601 std::unique_ptr<StreamSocket> socket, 607 std::unique_ptr<StreamSocket> socket,
602 int id) { 608 int id) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 HigherLayeredPool* higher_pool) { 650 HigherLayeredPool* higher_pool) {
645 base_.AddHigherLayeredPool(higher_pool); 651 base_.AddHigherLayeredPool(higher_pool);
646 } 652 }
647 653
648 void TransportClientSocketPool::RemoveHigherLayeredPool( 654 void TransportClientSocketPool::RemoveHigherLayeredPool(
649 HigherLayeredPool* higher_pool) { 655 HigherLayeredPool* higher_pool) {
650 base_.RemoveHigherLayeredPool(higher_pool); 656 base_.RemoveHigherLayeredPool(higher_pool);
651 } 657 }
652 658
653 } // namespace net 659 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698