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

Side by Side Diff: net/socket/websocket_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/websocket_transport_client_socket_pool.h" 5 #include "net/socket/websocket_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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 351
352 void WebSocketTransportClientSocketPool::RequestSockets( 352 void WebSocketTransportClientSocketPool::RequestSockets(
353 const std::string& group_name, 353 const std::string& group_name,
354 const void* params, 354 const void* params,
355 int num_sockets, 355 int num_sockets,
356 const BoundNetLog& net_log) { 356 const BoundNetLog& net_log) {
357 NOTIMPLEMENTED(); 357 NOTIMPLEMENTED();
358 } 358 }
359 359
360 void WebSocketTransportClientSocketPool::SetPriority(
361 const std::string& group_name,
362 ClientSocketHandle* handle,
363 RequestPriority priority) {
364 // Since sockets requested by RequestSocket are bound early, there's
365 // nothing to do within the pool to change priority or the request.
366 // TODO(rdsmith): Investigate plumbing the reprioritization request to the
367 // connect job.
368 }
369
360 void WebSocketTransportClientSocketPool::CancelRequest( 370 void WebSocketTransportClientSocketPool::CancelRequest(
361 const std::string& group_name, 371 const std::string& group_name,
362 ClientSocketHandle* handle) { 372 ClientSocketHandle* handle) {
363 DCHECK(!handle->is_initialized()); 373 DCHECK(!handle->is_initialized());
364 if (DeleteStalledRequest(handle)) 374 if (DeleteStalledRequest(handle))
365 return; 375 return;
366 std::unique_ptr<StreamSocket> socket = handle->PassSocket(); 376 std::unique_ptr<StreamSocket> socket = handle->PassSocket();
367 if (socket) 377 if (socket)
368 ReleaseSocket(handle->group_name(), std::move(socket), handle->id()); 378 ReleaseSocket(handle->group_name(), std::move(socket), handle->id());
369 if (!DeleteJob(handle)) 379 if (!DeleteJob(handle))
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 handle(handle), 644 handle(handle),
635 callback(callback), 645 callback(callback),
636 net_log(net_log) {} 646 net_log(net_log) {}
637 647
638 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( 648 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest(
639 const StalledRequest& other) = default; 649 const StalledRequest& other) = default;
640 650
641 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} 651 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {}
642 652
643 } // namespace net 653 } // namespace net
OLDNEW
« net/socket/client_socket_pool_base.cc ('K') | « net/socket/websocket_transport_client_socket_pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698