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

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: Incorporated comments. Created 3 years, 10 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
« no previous file with comments | « net/socket/websocket_transport_client_socket_pool.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 385 }
386 386
387 void WebSocketTransportClientSocketPool::RequestSockets( 387 void WebSocketTransportClientSocketPool::RequestSockets(
388 const std::string& group_name, 388 const std::string& group_name,
389 const void* params, 389 const void* params,
390 int num_sockets, 390 int num_sockets,
391 const NetLogWithSource& net_log) { 391 const NetLogWithSource& net_log) {
392 NOTIMPLEMENTED(); 392 NOTIMPLEMENTED();
393 } 393 }
394 394
395 void WebSocketTransportClientSocketPool::SetPriority(
396 const std::string& group_name,
397 ClientSocketHandle* handle,
398 RequestPriority priority) {
399 // Since sockets requested by RequestSocket are bound early and
400 // stalled_request_{queue,map} don't take priorities into account, there's
401 // nothing to do within the pool to change priority or the request.
402 // TODO(rdsmith, ricea): Make stalled_request_{queue,map} take priorities
403 // into account.
404 // TODO(rdsmith): Investigate plumbing the reprioritization request to the
405 // connect job.
406 }
407
395 void WebSocketTransportClientSocketPool::CancelRequest( 408 void WebSocketTransportClientSocketPool::CancelRequest(
396 const std::string& group_name, 409 const std::string& group_name,
397 ClientSocketHandle* handle) { 410 ClientSocketHandle* handle) {
398 DCHECK(!handle->is_initialized()); 411 DCHECK(!handle->is_initialized());
399 if (DeleteStalledRequest(handle)) 412 if (DeleteStalledRequest(handle))
400 return; 413 return;
401 std::unique_ptr<StreamSocket> socket = handle->PassSocket(); 414 std::unique_ptr<StreamSocket> socket = handle->PassSocket();
402 if (socket) 415 if (socket)
403 ReleaseSocket(handle->group_name(), std::move(socket), handle->id()); 416 ReleaseSocket(handle->group_name(), std::move(socket), handle->id());
404 if (!DeleteJob(handle)) 417 if (!DeleteJob(handle))
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 handle(handle), 710 handle(handle),
698 callback(callback), 711 callback(callback),
699 net_log(net_log) {} 712 net_log(net_log) {}
700 713
701 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( 714 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest(
702 const StalledRequest& other) = default; 715 const StalledRequest& other) = default;
703 716
704 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} 717 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {}
705 718
706 } // namespace net 719 } // namespace net
OLDNEW
« no previous file with comments | « 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