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 "extensions/browser/api/cast_channel/cast_socket.h" | 5 #include "extensions/browser/api/cast_channel/cast_socket.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return keep_alive_; | 167 return keep_alive_; |
168 } | 168 } |
169 | 169 |
170 bool CastSocketImpl::audio_only() const { | 170 bool CastSocketImpl::audio_only() const { |
171 return audio_only_; | 171 return audio_only_; |
172 } | 172 } |
173 | 173 |
174 scoped_ptr<net::TCPClientSocket> CastSocketImpl::CreateTcpSocket() { | 174 scoped_ptr<net::TCPClientSocket> CastSocketImpl::CreateTcpSocket() { |
175 net::AddressList addresses(ip_endpoint_); | 175 net::AddressList addresses(ip_endpoint_); |
176 return scoped_ptr<net::TCPClientSocket>( | 176 return scoped_ptr<net::TCPClientSocket>( |
177 new net::TCPClientSocket(addresses, net_log_, net_log_source_)); | 177 new net::TCPClientSocket(addresses, nullptr, net_log_, net_log_source_)); |
178 // Options cannot be set on the TCPClientSocket yet, because the | 178 // Options cannot be set on the TCPClientSocket yet, because the |
179 // underlying platform socket will not be created until Bind() | 179 // underlying platform socket will not be created until Bind() |
180 // or Connect() is called. | 180 // or Connect() is called. |
181 } | 181 } |
182 | 182 |
183 scoped_ptr<net::SSLClientSocket> CastSocketImpl::CreateSslSocket( | 183 scoped_ptr<net::SSLClientSocket> CastSocketImpl::CreateSslSocket( |
184 scoped_ptr<net::StreamSocket> socket) { | 184 scoped_ptr<net::StreamSocket> socket) { |
185 net::SSLConfig ssl_config; | 185 net::SSLConfig ssl_config; |
186 cert_verifier_ = make_scoped_ptr(new FakeCertVerifier); | 186 cert_verifier_ = make_scoped_ptr(new FakeCertVerifier); |
187 transport_security_state_.reset(new net::TransportSecurityState); | 187 transport_security_state_.reset(new net::TransportSecurityState); |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 VLOG_WITH_CONNECTION(1) << "SetErrorState " << error_state; | 613 VLOG_WITH_CONNECTION(1) << "SetErrorState " << error_state; |
614 DCHECK_EQ(CHANNEL_ERROR_NONE, error_state_); | 614 DCHECK_EQ(CHANNEL_ERROR_NONE, error_state_); |
615 error_state_ = error_state; | 615 error_state_ = error_state; |
616 logger_->LogSocketErrorState(channel_id_, ErrorStateToProto(error_state_)); | 616 logger_->LogSocketErrorState(channel_id_, ErrorStateToProto(error_state_)); |
617 delegate_->OnError(error_state_); | 617 delegate_->OnError(error_state_); |
618 } | 618 } |
619 } // namespace cast_channel | 619 } // namespace cast_channel |
620 } // namespace api | 620 } // namespace api |
621 } // namespace extensions | 621 } // namespace extensions |
622 #undef VLOG_WITH_CONNECTION | 622 #undef VLOG_WITH_CONNECTION |
OLD | NEW |