summaryrefslogtreecommitdiffstats
path: root/remoting/host/it2me_host_user_interface.cc
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 19:39:41 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 19:39:41 +0000
commit0059eb96d9e2ed945a7f62c192f4b66120e51380 (patch)
tree8637bba7223e8e57029d9ff1cf7ea08ee7ec2170 /remoting/host/it2me_host_user_interface.cc
parent8b6d53c71d9b82cb1882487b35be703d60f8860a (diff)
downloadchromium_src-0059eb96d9e2ed945a7f62c192f4b66120e51380.zip
chromium_src-0059eb96d9e2ed945a7f62c192f4b66120e51380.tar.gz
chromium_src-0059eb96d9e2ed945a7f62c192f4b66120e51380.tar.bz2
Fix race condition disconnecting hosts.
Also, remove a couple of unused functions and rename some to be more meaningful following the recent refactoring. BUG=102441 TEST=Manual Review URL: http://codereview.chromium.org/8775021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/it2me_host_user_interface.cc')
-rw-r--r--remoting/host/it2me_host_user_interface.cc22
1 files changed, 6 insertions, 16 deletions
diff --git a/remoting/host/it2me_host_user_interface.cc b/remoting/host/it2me_host_user_interface.cc
index 6a150b3..56b9c7b 100644
--- a/remoting/host/it2me_host_user_interface.cc
+++ b/remoting/host/it2me_host_user_interface.cc
@@ -66,7 +66,8 @@ void It2MeHostUserInterface::OnClientAuthenticated(const std::string& jid) {
std::string username = jid.substr(0, jid.find('/'));
ui_thread_proxy_.PostTask(FROM_HERE, base::Bind(
- &It2MeHostUserInterface::ProcessOnConnect, base::Unretained(this),
+ &It2MeHostUserInterface::ProcessOnClientAuthenticated,
+ base::Unretained(this),
username));
}
@@ -74,7 +75,7 @@ void It2MeHostUserInterface::OnClientDisconnected(const std::string& jid) {
if (jid == authenticated_jid_) {
authenticated_jid_.clear();
ui_thread_proxy_.PostTask(FROM_HERE, base::Bind(
- &It2MeHostUserInterface::ProcessOnLastDisconnect,
+ &It2MeHostUserInterface::ProcessOnClientDisconnected,
base::Unretained(this)));
}
}
@@ -96,19 +97,8 @@ void It2MeHostUserInterface::Shutdown() {
ui_thread_proxy_.Detach();
}
-void It2MeHostUserInterface::OnConnect(const std::string& username) {
- ui_thread_proxy_.PostTask(FROM_HERE, base::Bind(
- &It2MeHostUserInterface::ProcessOnConnect, base::Unretained(this),
- username));
-}
-
-void It2MeHostUserInterface::OnLastDisconnect() {
- ui_thread_proxy_.PostTask(FROM_HERE, base::Bind(
- &It2MeHostUserInterface::ProcessOnLastDisconnect,
- base::Unretained(this)));
-}
-
-void It2MeHostUserInterface::ProcessOnConnect(const std::string& username) {
+void It2MeHostUserInterface::ProcessOnClientAuthenticated(
+ const std::string& username) {
DCHECK(context_->ui_message_loop()->BelongsToCurrentThread());
MonitorLocalInputs(true);
@@ -116,7 +106,7 @@ void It2MeHostUserInterface::ProcessOnConnect(const std::string& username) {
StartContinueWindowTimer(true);
}
-void It2MeHostUserInterface::ProcessOnLastDisconnect() {
+void It2MeHostUserInterface::ProcessOnClientDisconnected() {
DCHECK(context_->ui_message_loop()->BelongsToCurrentThread());
MonitorLocalInputs(false);