OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // JingleClient::Callback implementations | 233 // JingleClient::Callback implementations |
234 void ChromotingHost::OnStateChange( | 234 void ChromotingHost::OnStateChange( |
235 SignalStrategy::StatusObserver::State state) { | 235 SignalStrategy::StatusObserver::State state) { |
236 DCHECK_EQ(MessageLoop::current(), context_->network_message_loop()); | 236 DCHECK_EQ(MessageLoop::current(), context_->network_message_loop()); |
237 | 237 |
238 if (state == SignalStrategy::StatusObserver::CONNECTED) { | 238 if (state == SignalStrategy::StatusObserver::CONNECTED) { |
239 VLOG(1) << "Host connected as " << local_jid_; | 239 VLOG(1) << "Host connected as " << local_jid_; |
240 | 240 |
241 // Create and start session manager. | 241 // Create and start session manager. |
242 protocol::JingleSessionManager* server = | 242 protocol::JingleSessionManager* server = |
243 new protocol::JingleSessionManager(NULL, NULL, NULL); | 243 protocol::JingleSessionManager::CreateNotSandboxed(); |
244 // TODO(ajwong): Make this a command switch when we're more stable. | 244 // TODO(ajwong): Make this a command switch when we're more stable. |
245 server->set_allow_local_ips(true); | 245 server->set_allow_local_ips(true); |
246 | 246 |
247 // Assign key and certificate to server. | 247 // Assign key and certificate to server. |
248 HostKeyPair key_pair; | 248 HostKeyPair key_pair; |
249 CHECK(key_pair.Load(config_)) | 249 CHECK(key_pair.Load(config_)) |
250 << "Failed to load server authentication data"; | 250 << "Failed to load server authentication data"; |
251 | 251 |
252 server->Init(local_jid_, signal_strategy_.get(), | 252 server->Init(local_jid_, signal_strategy_.get(), |
253 NewCallback(this, &ChromotingHost::OnNewClientSession), | 253 NewCallback(this, &ChromotingHost::OnNewClientSession), |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 673 |
674 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); | 674 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); |
675 it != shutdown_tasks_.end(); ++it) { | 675 it != shutdown_tasks_.end(); ++it) { |
676 (*it)->Run(); | 676 (*it)->Run(); |
677 delete *it; | 677 delete *it; |
678 } | 678 } |
679 shutdown_tasks_.clear(); | 679 shutdown_tasks_.clear(); |
680 } | 680 } |
681 | 681 |
682 } // namespace remoting | 682 } // namespace remoting |
OLD | NEW |