Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: remoting/host/it2me/it2me_host.cc

Issue 966433002: Malformed PortRange or ThirdPartyAuthConfig trigger OnPolicyError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a Windows-specific, pre-processor-related build break. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/policy_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | remoting/host/policy_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698