Index: remoting/host/remoting_me2me_host.cc |
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
index 59719f3a8df74f913dab5ab97de9028ad4c6504f..4390a7bd1598ee77c27fe88d7fc2b9c9a687fd9d 100644 |
--- a/remoting/host/remoting_me2me_host.cc |
+++ b/remoting/host/remoting_me2me_host.cc |
@@ -75,7 +75,6 @@ |
#include "remoting/protocol/authenticator.h" |
#include "remoting/protocol/channel_authenticator.h" |
#include "remoting/protocol/chromium_port_allocator.h" |
-#include "remoting/protocol/ice_transport.h" |
#include "remoting/protocol/jingle_session_manager.h" |
#include "remoting/protocol/me2me_host_authenticator_factory.h" |
#include "remoting/protocol/network_settings.h" |
@@ -83,7 +82,6 @@ |
#include "remoting/protocol/port_range.h" |
#include "remoting/protocol/token_validator.h" |
#include "remoting/protocol/transport_context.h" |
-#include "remoting/protocol/webrtc_transport.h" |
#include "remoting/signaling/push_notification_subscriber.h" |
#include "remoting/signaling/xmpp_signal_strategy.h" |
#include "third_party/webrtc/base/scoped_ref_ptr.h" |
@@ -880,6 +878,14 @@ void HostProcess::StartOnUiThread() { |
remoting::GnubbyAuthHandler::SetGnubbySocketName(gnubby_socket_name); |
#endif // defined(OS_LINUX) |
+#if defined(NDEBUG) |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableWebrtc)) { |
+ LOG(ERROR) << "WebRTC is enabled only in debug builds."; |
+ ShutdownHost(kUsageExitCode); |
+ return; |
+ } |
+#endif // defined(NDEBUG) |
+ |
// Create a desktop environment factory appropriate to the build type & |
// platform. |
#if defined(OS_WIN) |
@@ -1502,29 +1508,9 @@ void HostProcess::StartHost() { |
make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( |
context_->url_request_context_getter())), |
network_settings, protocol::TransportRole::SERVER); |
- scoped_ptr<protocol::TransportFactory> transport_factory; |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableWebrtc)) { |
-#if !defined(NDEBUG) |
- jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
- // The network thread is also used as worker thread for webrtc. |
- // |
- // TODO(sergeyu): Figure out if we would benefit from using a separate |
- // thread as a worker thread. |
- transport_factory.reset(new protocol::WebrtcTransportFactory( |
- jingle_glue::JingleThreadWrapper::current(), transport_context)); |
-#else // !defined(NDEBUG) |
- LOG(ERROR) << "WebRTC is enabled only in debug builds."; |
- ShutdownHost(kUsageExitCode); |
- return; |
-#endif // defined(NDEBUG) |
- } else { |
- transport_factory.reset( |
- new protocol::IceTransportFactory(transport_context)); |
- } |
scoped_ptr<protocol::SessionManager> session_manager( |
- new protocol::JingleSessionManager(std::move(transport_factory), |
- signal_strategy_.get())); |
+ new protocol::JingleSessionManager(signal_strategy_.get())); |
scoped_ptr<protocol::CandidateSessionConfig> protocol_config = |
protocol::CandidateSessionConfig::CreateDefault(); |
@@ -1541,8 +1527,8 @@ void HostProcess::StartHost() { |
host_.reset(new ChromotingHost( |
desktop_environment_factory_.get(), std::move(session_manager), |
- context_->audio_task_runner(), context_->input_task_runner(), |
- context_->video_capture_task_runner(), |
+ transport_context, context_->audio_task_runner(), |
+ context_->input_task_runner(), context_->video_capture_task_runner(), |
context_->video_encode_task_runner(), context_->network_task_runner(), |
context_->ui_task_runner())); |