summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 04:27:45 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 04:27:45 +0000
commit284d38477d32fb20a14208d30188b9e3a2b193e4 (patch)
treec50b27027abbf65f17027e7fa8d2e420ec3bb42a /remoting/host
parent7dc083d0d27caf718e7ddda8e9249c4063451fb2 (diff)
downloadchromium_src-284d38477d32fb20a14208d30188b9e3a2b193e4.zip
chromium_src-284d38477d32fb20a14208d30188b9e3a2b193e4.tar.gz
chromium_src-284d38477d32fb20a14208d30188b9e3a2b193e4.tar.bz2
Delete Session and SessionManager object synchronously.
JingleSession and JingleSessionManager were previously deleted asychronously, but it is not necessary anymore arter we've switched to PepperSession and PepperSessionManager. Instead changed LibjingleTransportFactory to delete libjingle objects asynchronously. Also fixed some bugs related that would cause crash when channel auth fails. BUG=115374 Review URL: http://codereview.chromium.org/9433027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/chromoting_host.cc15
-rw-r--r--remoting/host/chromoting_host.h9
2 files changed, 3 insertions, 21 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 920ad1e..0b9ee8f 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -39,7 +39,6 @@ ChromotingHost::ChromotingHost(
: context_(context),
desktop_environment_(environment),
network_settings_(network_settings),
- have_shared_secret_(false),
signal_strategy_(signal_strategy),
stopping_recorders_(0),
state_(kInitial),
@@ -101,18 +100,10 @@ void ChromotingHost::Shutdown(const base::Closure& shutdown_task) {
clients_.front()->Disconnect();
}
- // Stop session manager.
- if (session_manager_.get()) {
- session_manager_->Close();
- // It may not be safe to delete |session_manager_| here becase
- // this method may be invoked in response to a libjingle event and
- // libjingle's sigslot doesn't handle it properly, so postpone the
- // deletion.
- context_->network_message_loop()->DeleteSoon(
- FROM_HERE, session_manager_.release());
- have_shared_secret_ = false;
- }
+ // Destroy session manager.
+ session_manager_.reset();
+ // Stop screen recorder
if (recorder_.get()) {
StopScreenRecorder();
} else if (!stopping_recorders_) {
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index dc06acc..dd1e1cb 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -177,15 +177,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
DesktopEnvironment* desktop_environment_;
protocol::NetworkSettings network_settings_;
- // TODO(lambroslambrou): The following is a temporary fix for Me2Me
- // (crbug.com/105995), pending the AuthenticatorFactory work.
- // Cache the shared secret, in case SetSharedSecret() is called before the
- // session manager has been created.
- // The |have_shared_secret_| flag is to distinguish SetSharedSecret() not
- // being called at all, from being called with an empty string.
- std::string shared_secret_;
- bool have_shared_secret_;
-
// Connection objects.
SignalStrategy* signal_strategy_;
scoped_ptr<protocol::SessionManager> session_manager_;