| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/it2me/it2me_host.h" | 5 #include "remoting/host/it2me/it2me_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 base::Unretained(this)))); | 177 base::Unretained(this)))); |
| 178 | 178 |
| 179 // Beyond this point nothing can fail, so save the config and request. | 179 // Beyond this point nothing can fail, so save the config and request. |
| 180 signal_strategy_ = signal_strategy.Pass(); | 180 signal_strategy_ = signal_strategy.Pass(); |
| 181 register_request_ = register_request.Pass(); | 181 register_request_ = register_request.Pass(); |
| 182 | 182 |
| 183 // If NAT traversal is off then limit port range to allow firewall pin-holing. | 183 // If NAT traversal is off then limit port range to allow firewall pin-holing. |
| 184 HOST_LOG << "NAT state: " << nat_traversal_enabled_; | 184 HOST_LOG << "NAT state: " << nat_traversal_enabled_; |
| 185 NetworkSettings network_settings( | 185 NetworkSettings network_settings( |
| 186 nat_traversal_enabled_ ? | 186 nat_traversal_enabled_ ? |
| 187 NetworkSettings::NAT_TRAVERSAL_FULL : | 187 NetworkSettings::NAT_TRAVERSAL_ENABLED : |
| 188 NetworkSettings::NAT_TRAVERSAL_DISABLED); | 188 NetworkSettings::NAT_TRAVERSAL_DISABLED); |
| 189 if (!nat_traversal_enabled_) { | 189 if (!nat_traversal_enabled_) { |
| 190 network_settings.min_port = NetworkSettings::kDefaultMinPort; | 190 network_settings.min_port = NetworkSettings::kDefaultMinPort; |
| 191 network_settings.max_port = NetworkSettings::kDefaultMaxPort; | 191 network_settings.max_port = NetworkSettings::kDefaultMaxPort; |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Create the host. | 194 // Create the host. |
| 195 host_.reset(new ChromotingHost( | 195 host_.reset(new ChromotingHost( |
| 196 signal_strategy_.get(), | 196 signal_strategy_.get(), |
| 197 desktop_environment_factory_.get(), | 197 desktop_environment_factory_.get(), |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 ChromotingHostContext* context, | 469 ChromotingHostContext* context, |
| 470 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 470 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 471 base::WeakPtr<It2MeHost::Observer> observer, | 471 base::WeakPtr<It2MeHost::Observer> observer, |
| 472 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 472 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
| 473 const std::string& directory_bot_jid) { | 473 const std::string& directory_bot_jid) { |
| 474 return new It2MeHost( | 474 return new It2MeHost( |
| 475 context, task_runner, observer, xmpp_server_config, directory_bot_jid); | 475 context, task_runner, observer, xmpp_server_config, directory_bot_jid); |
| 476 } | 476 } |
| 477 | 477 |
| 478 } // namespace remoting | 478 } // namespace remoting |
| OLD | NEW |