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

Unified Diff: remoting/host/it2me/it2me_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
Index: remoting/host/it2me/it2me_host.cc
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc
index 17877370f0a50b8f3cc8c35c83a8c930e11eace4..94c89f25032b6ba7c0879dab6b33e23524195835 100644
--- a/remoting/host/it2me/it2me_host.cc
+++ b/remoting/host/it2me/it2me_host.cc
@@ -231,16 +231,15 @@ void It2MeHost::FinishConnect() {
protocol::NetworkSettings::kDefaultMaxPort;
}
- scoped_ptr<protocol::TransportFactory> transport_factory(
- new protocol::IceTransportFactory(new protocol::TransportContext(
+ scoped_refptr<protocol::TransportContext> transport_context =
+ new protocol::TransportContext(
signal_strategy_.get(),
make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory(
host_context_->url_request_context_getter())),
- network_settings, protocol::TransportRole::SERVER)));
+ network_settings, protocol::TransportRole::SERVER);
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();
@@ -252,7 +251,8 @@ void It2MeHost::FinishConnect() {
// Create the host.
host_.reset(new ChromotingHost(
desktop_environment_factory_.get(), std::move(session_manager),
- host_context_->audio_task_runner(), host_context_->input_task_runner(),
+ transport_context, host_context_->audio_task_runner(),
+ host_context_->input_task_runner(),
host_context_->video_capture_task_runner(),
host_context_->video_encode_task_runner(),
host_context_->network_task_runner(), host_context_->ui_task_runner()));

Powered by Google App Engine
This is Rietveld 408576698