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 "remoting/signaling/xmpp_signal_strategy.h" | 5 #include "remoting/signaling/xmpp_signal_strategy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 280 |
281 // Reset the writer so we don't try to write to the raw socket anymore. | 281 // Reset the writer so we don't try to write to the raw socket anymore. |
282 writer_.reset(); | 282 writer_.reset(); |
283 | 283 |
284 DCHECK(!read_pending_); | 284 DCHECK(!read_pending_); |
285 | 285 |
286 scoped_ptr<net::ClientSocketHandle> socket_handle( | 286 scoped_ptr<net::ClientSocketHandle> socket_handle( |
287 new net::ClientSocketHandle()); | 287 new net::ClientSocketHandle()); |
288 socket_handle->SetSocket(socket_.Pass()); | 288 socket_handle->SetSocket(socket_.Pass()); |
289 | 289 |
290 cert_verifier_.reset(net::CertVerifier::CreateDefault()); | 290 cert_verifier_ = net::CertVerifier::CreateDefault(); |
291 transport_security_state_.reset(new net::TransportSecurityState()); | 291 transport_security_state_.reset(new net::TransportSecurityState()); |
292 net::SSLClientSocketContext context; | 292 net::SSLClientSocketContext context; |
293 context.cert_verifier = cert_verifier_.get(); | 293 context.cert_verifier = cert_verifier_.get(); |
294 context.transport_security_state = transport_security_state_.get(); | 294 context.transport_security_state = transport_security_state_.get(); |
295 | 295 |
296 socket_ = socket_factory_->CreateSSLClientSocket( | 296 socket_ = socket_factory_->CreateSSLClientSocket( |
297 socket_handle.Pass(), | 297 socket_handle.Pass(), |
298 net::HostPortPair(xmpp_server_config_.host, kDefaultHttpsPort), | 298 net::HostPortPair(xmpp_server_config_.host, kDefaultHttpsPort), |
299 net::SSLConfig(), context); | 299 net::SSLConfig(), context); |
300 | 300 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 std::string XmppSignalStrategy::GetNextId() { | 528 std::string XmppSignalStrategy::GetNextId() { |
529 return base::Uint64ToString(base::RandUint64()); | 529 return base::Uint64ToString(base::RandUint64()); |
530 } | 530 } |
531 | 531 |
532 void XmppSignalStrategy::SetAuthInfo(const std::string& username, | 532 void XmppSignalStrategy::SetAuthInfo(const std::string& username, |
533 const std::string& auth_token) { | 533 const std::string& auth_token) { |
534 core_->SetAuthInfo(username, auth_token); | 534 core_->SetAuthInfo(username, auth_token); |
535 } | 535 } |
536 | 536 |
537 } // namespace remoting | 537 } // namespace remoting |
OLD | NEW |