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

Unified Diff: remoting/protocol/connection_to_host.cc

Issue 7312013: Minor cleanups in JingleSession and JingleSessionManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 5 months 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/protocol/connection_to_client.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host.cc
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index a632e4083cfc5ef06449e7471d09fe819dfaabd2..135dd1f808a45cb3496f5288bfe609d1398449fe 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -86,20 +86,14 @@ void ConnectionToHost::Disconnect(const base::Closure& shutdown_task) {
CloseChannels();
- if (session_.get()) {
- session_->Close();
+ if (session_.get())
session_.reset();
- }
- if (session_manager_.get()) {
- session_manager_->Close();
+ if (session_manager_.get())
session_manager_.reset();
- }
- if (signal_strategy_.get()) {
- signal_strategy_->Close();
+ if (signal_strategy_.get())
signal_strategy_.reset();
- }
shutdown_task.Run();
}
@@ -109,9 +103,9 @@ void ConnectionToHost::InitSession() {
// Initialize chromotocol |session_manager_|.
JingleSessionManager* session_manager =
- new JingleSessionManager(network_manager_.release(),
- socket_factory_.release(),
- port_allocator_session_factory_.release());
+ JingleSessionManager::CreateSandboxed(
+ network_manager_.release(), socket_factory_.release(),
+ port_allocator_session_factory_.release());
// TODO(ajwong): Make this a command switch when we're more stable.
session_manager->set_allow_local_ips(true);
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698