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

Unified Diff: remoting/host/it2me_host_user_interface.cc

Issue 8775021: Fix race condition disconnecting hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped_refptr instead of synchronization. Created 9 years, 1 month 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/host/it2me_host_user_interface.h ('k') | remoting/host/local_input_monitor_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me_host_user_interface.cc
diff --git a/remoting/host/it2me_host_user_interface.cc b/remoting/host/it2me_host_user_interface.cc
index 6a150b31d95003372d7d03f16ad26ef3fe38cec7..56b9c7b6150afe6132a0ccfeabe25b2eaea3dafb 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));
Sergey Ulanov 2011/12/01 21:14:16 nit: this parameter can be moved to the previous l
}
@@ -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);
« no previous file with comments | « remoting/host/it2me_host_user_interface.h ('k') | remoting/host/local_input_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698