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 // This is an application of a minimal host process in a Chromoting | 5 // This is an application of a minimal host process in a Chromoting |
6 // system. It serves the purpose of gluing different pieces together | 6 // system. It serves the purpose of gluing different pieces together |
7 // to make a functional host process for testing. | 7 // to make a functional host process for testing. |
8 // | 8 // |
9 // It peforms the following functionality: | 9 // It peforms the following functionality: |
10 // 1. Connect to the GTalk network and register the machine as a host. | 10 // 1. Connect to the GTalk network and register the machine as a host. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 env->GetVar(base::env_vars::kHome, &home_path); | 246 env->GetVar(base::env_vars::kHome, &home_path); |
247 return FilePath(home_path).Append(kDefaultConfigPath); | 247 return FilePath(home_path).Append(kDefaultConfigPath); |
248 #endif | 248 #endif |
249 } | 249 } |
250 | 250 |
251 void StartHost() { | 251 void StartHost() { |
252 signal_strategy_.reset(new XmppSignalStrategy( | 252 signal_strategy_.reset(new XmppSignalStrategy( |
253 context_.url_request_context_getter(), | 253 context_.url_request_context_getter(), |
254 xmpp_login_, xmpp_auth_token_, xmpp_auth_service_)); | 254 xmpp_login_, xmpp_auth_token_, xmpp_auth_service_)); |
255 scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker( | 255 scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker( |
256 new DnsBlackholeChecker(&context_, kDefaultHostTalkGadgetPrefix)); | 256 new DnsBlackholeChecker(context_.url_request_context_getter(), |
| 257 kDefaultHostTalkGadgetPrefix)); |
257 signaling_connector_.reset(new SignalingConnector( | 258 signaling_connector_.reset(new SignalingConnector( |
258 signal_strategy_.get(), &context_, dns_blackhole_checker.Pass(), | 259 signal_strategy_.get(), &context_, dns_blackhole_checker.Pass(), |
259 base::Bind(&SimpleHost::OnAuthFailed, base::Unretained(this)))); | 260 base::Bind(&SimpleHost::OnAuthFailed, base::Unretained(this)))); |
260 | 261 |
261 if (fake_) { | 262 if (fake_) { |
262 desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory()); | 263 desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory()); |
263 } else { | 264 } else { |
264 desktop_environment_factory_.reset(new DesktopEnvironmentFactory( | 265 desktop_environment_factory_.reset(new DesktopEnvironmentFactory( |
265 context_.input_task_runner(), context_.ui_task_runner())); | 266 context_.input_task_runner(), context_.ui_task_runner())); |
266 } | 267 } |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 max_port < 0 || max_port > 65535) { | 464 max_port < 0 || max_port > 65535) { |
464 LOG(ERROR) << "Invalid max-port value: " << max_port | 465 LOG(ERROR) << "Invalid max-port value: " << max_port |
465 << ". Expected integer in range [0, 65535]."; | 466 << ". Expected integer in range [0, 65535]."; |
466 return 1; | 467 return 1; |
467 } | 468 } |
468 simple_host.network_settings()->max_port = max_port; | 469 simple_host.network_settings()->max_port = max_port; |
469 } | 470 } |
470 | 471 |
471 return simple_host.Run(); | 472 return simple_host.Run(); |
472 } | 473 } |
OLD | NEW |