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..e4150e79740bc7fb0cd5b1de661ae68b4ff4e5bf 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,9 +63,11 @@ ChromotingHost::ChromotingHost( |
| ChromotingHostContext* context, |
| SignalStrategy* signal_strategy, |
| DesktopEnvironment* environment, |
| + scoped_ptr<SessionManagerFactory> session_manager_factory, |
| const NetworkSettings& network_settings) |
| : context_(context), |
| desktop_environment_(environment), |
| + session_manager_factory_(session_manager_factory.release()), |
|
Wez
2012/06/11 22:17:06
release() -> Pass()
simonmorris
2012/06/11 23:08:59
Done.
|
| network_settings_(network_settings), |
| signal_strategy_(signal_strategy), |
| stopping_recorders_(0), |
| @@ -97,24 +96,9 @@ 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)); |
| + session_manager_.reset(session_manager_factory_->MakeSessionManager( |
| + network_settings_, context_->url_request_context_getter()).release()); |
|
Wez
2012/06/11 22:17:06
release() -> Pass()
simonmorris
2012/06/11 23:08:59
This is a release()-reset() pair, so I don't think
Wez
2012/06/12 21:20:10
Right - it should be session_manager_ = ___.Pass()
simonmorris
2012/06/13 16:26:33
Done.
|
| session_manager_->Init(signal_strategy_, this); |
| } |