OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/client/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include <nacl_io/nacl_io.h> | 10 #include <nacl_io/nacl_io.h> |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 new protocol::NegotiatingClientAuthenticator( | 638 new protocol::NegotiatingClientAuthenticator( |
639 client_pairing_id, client_paired_secret, authentication_tag, | 639 client_pairing_id, client_paired_secret, authentication_tag, |
640 fetch_secret_callback, token_fetcher.Pass(), auth_methods)); | 640 fetch_secret_callback, token_fetcher.Pass(), auth_methods)); |
641 | 641 |
642 scoped_ptr<protocol::CandidateSessionConfig> config = | 642 scoped_ptr<protocol::CandidateSessionConfig> config = |
643 protocol::CandidateSessionConfig::CreateDefault(); | 643 protocol::CandidateSessionConfig::CreateDefault(); |
644 if (std::find(experiments_list.begin(), experiments_list.end(), "vp9") != | 644 if (std::find(experiments_list.begin(), experiments_list.end(), "vp9") != |
645 experiments_list.end()) { | 645 experiments_list.end()) { |
646 config->set_vp9_experiment_enabled(true); | 646 config->set_vp9_experiment_enabled(true); |
647 } | 647 } |
| 648 if (std::find(experiments_list.begin(), experiments_list.end(), "quic") != |
| 649 experiments_list.end()) { |
| 650 config->PreferTransport(protocol::ChannelConfig::TRANSPORT_QUIC_STREAM); |
| 651 } |
648 client_->set_protocol_config(config.Pass()); | 652 client_->set_protocol_config(config.Pass()); |
649 | 653 |
650 // Kick off the connection. | 654 // Kick off the connection. |
651 client_->Start(signal_strategy_.get(), authenticator.Pass(), | 655 client_->Start(signal_strategy_.get(), authenticator.Pass(), |
652 transport_factory.Pass(), host_jid, capabilities); | 656 transport_factory.Pass(), host_jid, capabilities); |
653 | 657 |
654 // Start timer that periodically sends perf stats. | 658 // Start timer that periodically sends perf stats. |
655 plugin_task_runner_->PostDelayedTask( | 659 plugin_task_runner_->PostDelayedTask( |
656 FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, | 660 FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, |
657 weak_factory_.GetWeakPtr()), | 661 weak_factory_.GetWeakPtr()), |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 | 1065 |
1062 return false; | 1066 return false; |
1063 } | 1067 } |
1064 | 1068 |
1065 bool ChromotingInstance::IsConnected() { | 1069 bool ChromotingInstance::IsConnected() { |
1066 return client_ && | 1070 return client_ && |
1067 (client_->connection_state() == protocol::ConnectionToHost::CONNECTED); | 1071 (client_->connection_state() == protocol::ConnectionToHost::CONNECTED); |
1068 } | 1072 } |
1069 | 1073 |
1070 } // namespace remoting | 1074 } // namespace remoting |
OLD | NEW |