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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 04be3d3a32a927b286efd67650a59a1c873f2fe1..6628902f238862048fd1b3a06dc8ebcb133e85bf 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -80,7 +80,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"
@@ -88,7 +87,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"
@@ -885,6 +883,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)
@@ -1507,29 +1513,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();
@@ -1546,8 +1532,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()));
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698