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 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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::CancelRequest( | 360 void WebSocketTransportClientSocketPool::CancelRequest( |
361 const std::string& group_name, | 361 const std::string& group_name, |
362 ClientSocketHandle* handle) { | 362 ClientSocketHandle* handle) { |
363 if (DeleteStalledRequest(handle)) | 363 if (DeleteStalledRequest(handle)) |
364 return; | 364 return; |
365 scoped_ptr<StreamSocket> socket = handle->PassSocket(); | |
yhirano
2014/07/18 07:52:08
ClientSocketHandle::PassSocket says:
// SetSocket(
Adam Rice
2014/07/18 09:08:27
Done.
| |
366 if (socket) | |
367 ReleaseSocket(handle->group_name(), socket.Pass(), handle->id()); | |
365 if (!DeleteJob(handle)) | 368 if (!DeleteJob(handle)) |
366 pending_callbacks_.erase(handle); | 369 pending_callbacks_.erase(handle); |
367 if (!ReachedMaxSocketsLimit() && !stalled_request_queue_.empty()) | 370 if (!ReachedMaxSocketsLimit() && !stalled_request_queue_.empty()) |
368 ActivateStalledRequest(); | 371 ActivateStalledRequest(); |
369 } | 372 } |
370 | 373 |
371 void WebSocketTransportClientSocketPool::ReleaseSocket( | 374 void WebSocketTransportClientSocketPool::ReleaseSocket( |
372 const std::string& group_name, | 375 const std::string& group_name, |
373 scoped_ptr<StreamSocket> socket, | 376 scoped_ptr<StreamSocket> socket, |
374 int id) { | 377 int id) { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 const BoundNetLog& net_log) | 638 const BoundNetLog& net_log) |
636 : params(params), | 639 : params(params), |
637 priority(priority), | 640 priority(priority), |
638 handle(handle), | 641 handle(handle), |
639 callback(callback), | 642 callback(callback), |
640 net_log(net_log) {} | 643 net_log(net_log) {} |
641 | 644 |
642 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} | 645 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} |
643 | 646 |
644 } // namespace net | 647 } // namespace net |
OLD | NEW |