| 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/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
| 10 #include "net/socket/client_socket_factory.h" | 10 #include "net/socket/client_socket_factory.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 signal_strategy_ = signal_strategy.Pass(); | 222 signal_strategy_ = signal_strategy.Pass(); |
| 223 register_request_ = register_request.Pass(); | 223 register_request_ = register_request.Pass(); |
| 224 | 224 |
| 225 // If NAT traversal is off then limit port range to allow firewall pin-holing. | 225 // If NAT traversal is off then limit port range to allow firewall pin-holing. |
| 226 HOST_LOG << "NAT state: " << nat_traversal_enabled_; | 226 HOST_LOG << "NAT state: " << nat_traversal_enabled_; |
| 227 protocol::NetworkSettings network_settings( | 227 protocol::NetworkSettings network_settings( |
| 228 nat_traversal_enabled_ ? | 228 nat_traversal_enabled_ ? |
| 229 protocol::NetworkSettings::NAT_TRAVERSAL_FULL : | 229 protocol::NetworkSettings::NAT_TRAVERSAL_FULL : |
| 230 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED); | 230 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED); |
| 231 if (!nat_traversal_enabled_) { | 231 if (!nat_traversal_enabled_) { |
| 232 network_settings.min_port = protocol::NetworkSettings::kDefaultMinPort; | 232 network_settings.port_range.min_port = |
| 233 network_settings.max_port = protocol::NetworkSettings::kDefaultMaxPort; | 233 protocol::NetworkSettings::kDefaultMinPort; |
| 234 network_settings.port_range.max_port = |
| 235 protocol::NetworkSettings::kDefaultMaxPort; |
| 234 } | 236 } |
| 235 | 237 |
| 236 // Create the host. | 238 // Create the host. |
| 237 host_.reset(new ChromotingHost( | 239 host_.reset(new ChromotingHost( |
| 238 signal_strategy_.get(), | 240 signal_strategy_.get(), |
| 239 desktop_environment_factory_.get(), | 241 desktop_environment_factory_.get(), |
| 240 CreateHostSessionManager(signal_strategy_.get(), network_settings, | 242 CreateHostSessionManager(signal_strategy_.get(), network_settings, |
| 241 host_context_->url_request_context_getter()), | 243 host_context_->url_request_context_getter()), |
| 242 host_context_->audio_task_runner(), | 244 host_context_->audio_task_runner(), |
| 243 host_context_->input_task_runner(), | 245 host_context_->input_task_runner(), |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( | 530 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
| 529 new It2MeConfirmationDialogFactory()); | 531 new It2MeConfirmationDialogFactory()); |
| 530 scoped_ptr<PolicyWatcher> policy_watcher = | 532 scoped_ptr<PolicyWatcher> policy_watcher = |
| 531 PolicyWatcher::Create(policy_service_, context->file_task_runner()); | 533 PolicyWatcher::Create(policy_service_, context->file_task_runner()); |
| 532 return new It2MeHost(context.Pass(), policy_watcher.Pass(), | 534 return new It2MeHost(context.Pass(), policy_watcher.Pass(), |
| 533 confirmation_dialog_factory.Pass(), | 535 confirmation_dialog_factory.Pass(), |
| 534 observer, xmpp_server_config, directory_bot_jid); | 536 observer, xmpp_server_config, directory_bot_jid); |
| 535 } | 537 } |
| 536 | 538 |
| 537 } // namespace remoting | 539 } // namespace remoting |
| OLD | NEW |