Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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, there's | |
| 400 // nothing to do within the pool to change priority or the request. | |
| 401 // TODO(rdsmith): Investigate plumbing the reprioritization request to the | |
| 402 // connect job. | |
|
mmenke
2017/01/18 20:37:27
What if it's in stalled_request_map_?
Randy Smith (Not in Mondays)
2017/01/22 21:37:00
Hmmm. Good point, I missed that.
However, stalle
Adam Rice
2017/01/23 02:26:34
All WebSocket handshakes happen at DEFAULT_PRIORIT
| |
| 403 } | |
| 404 | |
| 395 void WebSocketTransportClientSocketPool::CancelRequest( | 405 void WebSocketTransportClientSocketPool::CancelRequest( |
| 396 const std::string& group_name, | 406 const std::string& group_name, |
| 397 ClientSocketHandle* handle) { | 407 ClientSocketHandle* handle) { |
| 398 DCHECK(!handle->is_initialized()); | 408 DCHECK(!handle->is_initialized()); |
| 399 if (DeleteStalledRequest(handle)) | 409 if (DeleteStalledRequest(handle)) |
| 400 return; | 410 return; |
| 401 std::unique_ptr<StreamSocket> socket = handle->PassSocket(); | 411 std::unique_ptr<StreamSocket> socket = handle->PassSocket(); |
| 402 if (socket) | 412 if (socket) |
| 403 ReleaseSocket(handle->group_name(), std::move(socket), handle->id()); | 413 ReleaseSocket(handle->group_name(), std::move(socket), handle->id()); |
| 404 if (!DeleteJob(handle)) | 414 if (!DeleteJob(handle)) |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 697 handle(handle), | 707 handle(handle), |
| 698 callback(callback), | 708 callback(callback), |
| 699 net_log(net_log) {} | 709 net_log(net_log) {} |
| 700 | 710 |
| 701 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( | 711 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( |
| 702 const StalledRequest& other) = default; | 712 const StalledRequest& other) = default; |
| 703 | 713 |
| 704 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} | 714 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} |
| 705 | 715 |
| 706 } // namespace net | 716 } // namespace net |
| OLD | NEW |