summaryrefslogtreecommitdiffstats
path: root/remoting/host/remoting_me2me_host.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-25 22:23:44 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-25 22:23:44 +0000
commit875a5dee67aab7a1f0c6d212517f04e026bdabf5 (patch)
tree3b162e88893054006a92111fdc56fa47c146fa02 /remoting/host/remoting_me2me_host.cc
parentfd56eb74590b02848622598ce79fd6b595fcbc96 (diff)
downloadchromium_src-875a5dee67aab7a1f0c6d212517f04e026bdabf5.zip
chromium_src-875a5dee67aab7a1f0c6d212517f04e026bdabf5.tar.gz
chromium_src-875a5dee67aab7a1f0c6d212517f04e026bdabf5.tar.bz2
Don't restart the host to disconnect clients
Currently the host is restarted when user clicks Disconnect button on the connection dialog. This isn't necessary - clients can be disconnected without restarting the host. Review URL: https://chromiumcodereview.appspot.com/10455008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/remoting_me2me_host.cc')
-rw-r--r--remoting/host/remoting_me2me_host.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 2045347..7564f4a 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -394,8 +394,8 @@ class HostProcess
#if defined(OS_MACOSX) || defined(OS_WIN)
host_user_interface_->Start(
- host_,
- base::Bind(&HostProcess::OnRestartHostRequest, base::Unretained(this)));
+ host_, base::Bind(&HostProcess::OnDisconnectRequested,
+ base::Unretained(this)));
#endif
host_->Start();
@@ -407,14 +407,12 @@ class HostProcess
Shutdown(kInvalidOauthCredentialsExitCode);
}
- // Invoked from when the user uses the Disconnect windows to terminate
+ // Invoked when the user uses the Disconnect windows to terminate
// the sessions.
- void OnRestartHostRequest() {
+ void OnDisconnectRequested() {
DCHECK(message_loop_.message_loop_proxy()->BelongsToCurrentThread());
- context_->network_message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&HostProcess::RestartHost, base::Unretained(this)));
+ host_->DisconnectAllClients();
}
void RestartHost() {