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

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
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..f68a8b567eced45f25ffe1c53d92fbce3575c168 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::Create(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);

Powered by Google App Engine
This is Rietveld 408576698