| 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" |
| 11 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
| 12 #include "base/profiler/scoped_tracker.h" | |
| 13 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 15 #include "base/values.h" | 14 #include "base/values.h" |
| 16 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 17 #include "net/log/net_log.h" | 16 #include "net/log/net_log.h" |
| 18 #include "net/socket/client_socket_handle.h" | 17 #include "net/socket/client_socket_handle.h" |
| 19 #include "net/socket/client_socket_pool_base.h" | 18 #include "net/socket/client_socket_pool_base.h" |
| 20 #include "net/socket/websocket_endpoint_lock_manager.h" | 19 #include "net/socket/websocket_endpoint_lock_manager.h" |
| 21 #include "net/socket/websocket_transport_connect_sub_job.h" | 20 #include "net/socket/websocket_transport_connect_sub_job.h" |
| 22 | 21 |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 WebSocketTransportClientSocketPool::ConnectJobDelegate::ConnectJobDelegate( | 615 WebSocketTransportClientSocketPool::ConnectJobDelegate::ConnectJobDelegate( |
| 617 WebSocketTransportClientSocketPool* owner) | 616 WebSocketTransportClientSocketPool* owner) |
| 618 : owner_(owner) {} | 617 : owner_(owner) {} |
| 619 | 618 |
| 620 WebSocketTransportClientSocketPool::ConnectJobDelegate::~ConnectJobDelegate() {} | 619 WebSocketTransportClientSocketPool::ConnectJobDelegate::~ConnectJobDelegate() {} |
| 621 | 620 |
| 622 void | 621 void |
| 623 WebSocketTransportClientSocketPool::ConnectJobDelegate::OnConnectJobComplete( | 622 WebSocketTransportClientSocketPool::ConnectJobDelegate::OnConnectJobComplete( |
| 624 int result, | 623 int result, |
| 625 ConnectJob* job) { | 624 ConnectJob* job) { |
| 626 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed. | |
| 627 tracked_objects::ScopedTracker tracking_profile( | |
| 628 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
| 629 "436634 WebSocket...::ConnectJobDelegate::OnConnectJobComplete")); | |
| 630 | |
| 631 owner_->OnConnectJobComplete(result, | 625 owner_->OnConnectJobComplete(result, |
| 632 static_cast<WebSocketTransportConnectJob*>(job)); | 626 static_cast<WebSocketTransportConnectJob*>(job)); |
| 633 } | 627 } |
| 634 | 628 |
| 635 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( | 629 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( |
| 636 const scoped_refptr<TransportSocketParams>& params, | 630 const scoped_refptr<TransportSocketParams>& params, |
| 637 RequestPriority priority, | 631 RequestPriority priority, |
| 638 ClientSocketHandle* handle, | 632 ClientSocketHandle* handle, |
| 639 const CompletionCallback& callback, | 633 const CompletionCallback& callback, |
| 640 const BoundNetLog& net_log) | 634 const BoundNetLog& net_log) |
| 641 : params(params), | 635 : params(params), |
| 642 priority(priority), | 636 priority(priority), |
| 643 handle(handle), | 637 handle(handle), |
| 644 callback(callback), | 638 callback(callback), |
| 645 net_log(net_log) {} | 639 net_log(net_log) {} |
| 646 | 640 |
| 647 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} | 641 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} |
| 648 | 642 |
| 649 } // namespace net | 643 } // namespace net |
| OLD | NEW |