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_connect_sub_job.h" | 5 #include "net/socket/websocket_transport_connect_sub_job.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/log/net_log.h" | 10 #include "net/log/net_log.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 NOTREACHED(); | 64 NOTREACHED(); |
65 return LOAD_STATE_IDLE; | 65 return LOAD_STATE_IDLE; |
66 } | 66 } |
67 | 67 |
68 ClientSocketFactory* WebSocketTransportConnectSubJob::client_socket_factory() | 68 ClientSocketFactory* WebSocketTransportConnectSubJob::client_socket_factory() |
69 const { | 69 const { |
70 return parent_job_->client_socket_factory_; | 70 return parent_job_->client_socket_factory_; |
71 } | 71 } |
72 | 72 |
73 const BoundNetLog& WebSocketTransportConnectSubJob::net_log() const { | 73 const NetLogWithSource& WebSocketTransportConnectSubJob::net_log() const { |
74 return parent_job_->net_log(); | 74 return parent_job_->net_log(); |
75 } | 75 } |
76 | 76 |
77 const IPEndPoint& WebSocketTransportConnectSubJob::CurrentAddress() const { | 77 const IPEndPoint& WebSocketTransportConnectSubJob::CurrentAddress() const { |
78 DCHECK_LT(current_address_index_, addresses_.size()); | 78 DCHECK_LT(current_address_index_, addresses_.size()); |
79 return addresses_[current_address_index_]; | 79 return addresses_[current_address_index_]; |
80 } | 80 } |
81 | 81 |
82 void WebSocketTransportConnectSubJob::OnIOComplete(int result) { | 82 void WebSocketTransportConnectSubJob::OnIOComplete(int result) { |
83 int rv = DoLoop(result); | 83 int rv = DoLoop(result); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 return result; | 161 return result; |
162 } | 162 } |
163 | 163 |
164 endpoint_lock_manager->RememberSocket(transport_socket_.get(), | 164 endpoint_lock_manager->RememberSocket(transport_socket_.get(), |
165 CurrentAddress()); | 165 CurrentAddress()); |
166 | 166 |
167 return result; | 167 return result; |
168 } | 168 } |
169 | 169 |
170 } // namespace net | 170 } // namespace net |
OLD | NEW |