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

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

Issue 390983003: Remove remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/it2me/it2me_host.h ('k') | remoting/host/register_support_host_request.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/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"
11 #include "net/socket/client_socket_factory.h" 11 #include "net/socket/client_socket_factory.h"
12 #include "remoting/base/auto_thread.h" 12 #include "remoting/base/auto_thread.h"
13 #include "remoting/base/logging.h" 13 #include "remoting/base/logging.h"
14 #include "remoting/base/rsa_key_pair.h" 14 #include "remoting/base/rsa_key_pair.h"
15 #include "remoting/host/chromoting_host.h" 15 #include "remoting/host/chromoting_host.h"
16 #include "remoting/host/chromoting_host_context.h" 16 #include "remoting/host/chromoting_host_context.h"
17 #include "remoting/host/host_event_logger.h" 17 #include "remoting/host/host_event_logger.h"
18 #include "remoting/host/host_secret.h" 18 #include "remoting/host/host_secret.h"
19 #include "remoting/host/host_status_logger.h" 19 #include "remoting/host/host_status_logger.h"
20 #include "remoting/host/it2me_desktop_environment.h" 20 #include "remoting/host/it2me_desktop_environment.h"
21 #include "remoting/host/policy_hack/policy_watcher.h" 21 #include "remoting/host/policy_hack/policy_watcher.h"
22 #include "remoting/host/register_support_host_request.h" 22 #include "remoting/host/register_support_host_request.h"
23 #include "remoting/host/session_manager_factory.h" 23 #include "remoting/host/session_manager_factory.h"
24 #include "remoting/jingle_glue/network_settings.h"
25 #include "remoting/jingle_glue/server_log_entry.h"
26 #include "remoting/protocol/it2me_host_authenticator_factory.h" 24 #include "remoting/protocol/it2me_host_authenticator_factory.h"
25 #include "remoting/protocol/network_settings.h"
26 #include "remoting/signaling/server_log_entry.h"
27 27
28 namespace remoting { 28 namespace remoting {
29 29
30 namespace { 30 namespace {
31 31
32 // This is used for tagging system event logs. 32 // This is used for tagging system event logs.
33 const char kApplicationName[] = "chromoting"; 33 const char kApplicationName[] = "chromoting";
34 const int kMaxLoginAttempts = 5; 34 const int kMaxLoginAttempts = 5;
35 35
36 } // namespace 36 } // namespace
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 signal_strategy.get(), host_key_pair_, directory_bot_jid_, 177 signal_strategy.get(), host_key_pair_, directory_bot_jid_,
178 base::Bind(&It2MeHost::OnReceivedSupportID, 178 base::Bind(&It2MeHost::OnReceivedSupportID,
179 base::Unretained(this)))); 179 base::Unretained(this))));
180 180
181 // Beyond this point nothing can fail, so save the config and request. 181 // Beyond this point nothing can fail, so save the config and request.
182 signal_strategy_ = signal_strategy.Pass(); 182 signal_strategy_ = signal_strategy.Pass();
183 register_request_ = register_request.Pass(); 183 register_request_ = register_request.Pass();
184 184
185 // If NAT traversal is off then limit port range to allow firewall pin-holing. 185 // If NAT traversal is off then limit port range to allow firewall pin-holing.
186 HOST_LOG << "NAT state: " << nat_traversal_enabled_; 186 HOST_LOG << "NAT state: " << nat_traversal_enabled_;
187 NetworkSettings network_settings( 187 protocol::NetworkSettings network_settings(
188 nat_traversal_enabled_ ? 188 nat_traversal_enabled_ ?
189 NetworkSettings::NAT_TRAVERSAL_FULL : 189 protocol::NetworkSettings::NAT_TRAVERSAL_FULL :
190 NetworkSettings::NAT_TRAVERSAL_DISABLED); 190 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED);
191 if (!nat_traversal_enabled_) { 191 if (!nat_traversal_enabled_) {
192 network_settings.min_port = NetworkSettings::kDefaultMinPort; 192 network_settings.min_port = protocol::NetworkSettings::kDefaultMinPort;
193 network_settings.max_port = NetworkSettings::kDefaultMaxPort; 193 network_settings.max_port = protocol::NetworkSettings::kDefaultMaxPort;
194 } 194 }
195 195
196 // Create the host. 196 // Create the host.
197 host_.reset(new ChromotingHost( 197 host_.reset(new ChromotingHost(
198 signal_strategy_.get(), 198 signal_strategy_.get(),
199 desktop_environment_factory_.get(), 199 desktop_environment_factory_.get(),
200 CreateHostSessionManager(signal_strategy_.get(), network_settings, 200 CreateHostSessionManager(signal_strategy_.get(), network_settings,
201 host_context_->url_request_context_getter()), 201 host_context_->url_request_context_getter()),
202 host_context_->audio_task_runner(), 202 host_context_->audio_task_runner(),
203 host_context_->input_task_runner(), 203 host_context_->input_task_runner(),
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ChromotingHostContext* context, 467 ChromotingHostContext* context,
468 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 468 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
469 base::WeakPtr<It2MeHost::Observer> observer, 469 base::WeakPtr<It2MeHost::Observer> observer,
470 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, 470 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config,
471 const std::string& directory_bot_jid) { 471 const std::string& directory_bot_jid) {
472 return new It2MeHost( 472 return new It2MeHost(
473 context, task_runner, observer, xmpp_server_config, directory_bot_jid); 473 context, task_runner, observer, xmpp_server_config, directory_bot_jid);
474 } 474 }
475 475
476 } // namespace remoting 476 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_host.h ('k') | remoting/host/register_support_host_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698