Chromium Code Reviews| Index: remoting/host/chromoting_host.cc |
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc |
| index 81f87bc2d33382e86afb194a1c6522814953e9bb..1bc412186f0b8a18f23b2c34331c36e02695ac53 100644 |
| --- a/remoting/host/chromoting_host.cc |
| +++ b/remoting/host/chromoting_host.cc |
| @@ -17,14 +17,11 @@ |
| #include "remoting/host/desktop_environment.h" |
| #include "remoting/host/event_executor.h" |
| #include "remoting/host/host_config.h" |
| -#include "remoting/host/host_port_allocator.h" |
| #include "remoting/host/screen_recorder.h" |
| #include "remoting/protocol/connection_to_client.h" |
| #include "remoting/protocol/client_stub.h" |
| #include "remoting/protocol/host_stub.h" |
| #include "remoting/protocol/input_stub.h" |
| -#include "remoting/protocol/jingle_session_manager.h" |
| -#include "remoting/protocol/libjingle_transport_factory.h" |
| #include "remoting/protocol/session_config.h" |
| using remoting::protocol::ConnectionToClient; |
| @@ -66,10 +63,10 @@ ChromotingHost::ChromotingHost( |
| ChromotingHostContext* context, |
| SignalStrategy* signal_strategy, |
| DesktopEnvironment* environment, |
| - const NetworkSettings& network_settings) |
| + scoped_ptr<protocol::SessionManager> session_manager) |
| : context_(context), |
| desktop_environment_(environment), |
| - network_settings_(network_settings), |
| + session_manager_(session_manager.Pass()), |
| signal_strategy_(signal_strategy), |
| stopping_recorders_(0), |
| state_(kInitial), |
| @@ -97,24 +94,7 @@ void ChromotingHost::Start() { |
| return; |
| state_ = kStarted; |
| - // Create port allocator and transport factory. |
| - scoped_ptr<HostPortAllocator> port_allocator( |
| - HostPortAllocator::Create(context_->url_request_context_getter(), |
| - network_settings_)); |
| - |
| - bool incoming_only = network_settings_.nat_traversal_mode == |
| - NetworkSettings::NAT_TRAVERSAL_DISABLED; |
| - |
| - scoped_ptr<protocol::TransportFactory> transport_factory( |
| - new protocol::LibjingleTransportFactory( |
| - port_allocator.PassAs<cricket::HttpPortAllocatorBase>(), |
| - incoming_only)); |
| - |
| - // Create and start session manager. |
| - bool fetch_stun_relay_info = network_settings_.nat_traversal_mode == |
| - NetworkSettings::NAT_TRAVERSAL_ENABLED; |
| - session_manager_.reset(new protocol::JingleSessionManager( |
| - transport_factory.Pass(), fetch_stun_relay_info)); |
| + // Start session manager. |
|
Wez
2012/06/12 21:20:10
nit: Suggest "Start the SessionManager, supplying
simonmorris
2012/06/13 16:26:33
Done.
|
| session_manager_->Init(signal_strategy_, this); |
|
Sergey Ulanov
2012/06/13 01:57:19
It may be better to separate Init() from SetListen
simonmorris
2012/06/13 16:26:33
Sounds good, but that can be done in a separate CL
|
| } |