| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/protocol/quic_channel_factory.h" | 5 #include "remoting/protocol/quic_channel_factory.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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 401 } |
| 402 return; | 402 return; |
| 403 } | 403 } |
| 404 | 404 |
| 405 QuicPacketWriterFactory writer_factory(socket.get()); | 405 QuicPacketWriterFactory writer_factory(socket.get()); |
| 406 net::IPAddressNumber ip(net::kIPv4AddressSize, 0); | 406 net::IPAddressNumber ip(net::kIPv4AddressSize, 0); |
| 407 scoped_ptr<net::QuicConnection> quic_connection(new net::QuicConnection( | 407 scoped_ptr<net::QuicConnection> quic_connection(new net::QuicConnection( |
| 408 0, net::IPEndPoint(ip, 0), &quic_helper_, writer_factory, | 408 0, net::IPEndPoint(ip, 0), &quic_helper_, writer_factory, |
| 409 true /* owns_writer */, | 409 true /* owns_writer */, |
| 410 is_server_ ? net::Perspective::IS_SERVER : net::Perspective::IS_CLIENT, | 410 is_server_ ? net::Perspective::IS_SERVER : net::Perspective::IS_CLIENT, |
| 411 true /* is_secure */, net::QuicSupportedVersions())); | 411 net::QuicSupportedVersions())); |
| 412 | 412 |
| 413 net::QuicP2PCryptoConfig quic_crypto_config(shared_secret_); | 413 net::QuicP2PCryptoConfig quic_crypto_config(shared_secret_); |
| 414 quic_crypto_config.set_hkdf_input_suffix( | 414 quic_crypto_config.set_hkdf_input_suffix( |
| 415 session_id_ + '\0' + kQuicChannelName + '\0' + | 415 session_id_ + '\0' + kQuicChannelName + '\0' + |
| 416 session_initiate_quic_config_message_ + | 416 session_initiate_quic_config_message_ + |
| 417 session_accept_quic_config_message_); | 417 session_accept_quic_config_message_); |
| 418 | 418 |
| 419 quic_session_.reset(new net::QuicP2PSession( | 419 quic_session_.reset(new net::QuicP2PSession( |
| 420 quic_config_, quic_crypto_config, quic_connection.Pass(), | 420 quic_config_, quic_crypto_config, quic_connection.Pass(), |
| 421 make_scoped_ptr(new P2PDatagramSocketAdapter(socket.Pass())))); | 421 make_scoped_ptr(new P2PDatagramSocketAdapter(socket.Pass())))); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 void QuicChannelFactory::CancelChannelCreation(const std::string& name) { | 532 void QuicChannelFactory::CancelChannelCreation(const std::string& name) { |
| 533 core_->CancelChannelCreation(name); | 533 core_->CancelChannelCreation(name); |
| 534 } | 534 } |
| 535 | 535 |
| 536 net::QuicP2PSession* QuicChannelFactory::GetP2PSessionForTests() { | 536 net::QuicP2PSession* QuicChannelFactory::GetP2PSessionForTests() { |
| 537 return core_->quic_session_.get(); | 537 return core_->quic_session_.get(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 } // namespace protocol | 540 } // namespace protocol |
| 541 } // namespace remoting | 541 } // namespace remoting |
| OLD | NEW |