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

Unified Diff: remoting/host/it2me_host_user_interface.h

Issue 8775021: Fix race condition disconnecting hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: remoting/host/it2me_host_user_interface.h
diff --git a/remoting/host/it2me_host_user_interface.h b/remoting/host/it2me_host_user_interface.h
index 11d39d69306f8b03f4a0e52283dd467a19e1464d..23e4750f1063a098e766f8b25f69ac912c8c3ca9 100644
--- a/remoting/host/it2me_host_user_interface.h
+++ b/remoting/host/it2me_host_user_interface.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/synchronization/waitable_event.h"
#include "remoting/base/scoped_thread_proxy.h"
#include "remoting/host/host_status_observer.h"
@@ -67,11 +68,8 @@ class It2MeHostUserInterface : public HostStatusObserver {
ContinueWindow* continue_window,
LocalInputMonitor* monitor);
- void OnConnect(const std::string& username);
- void OnLastDisconnect();
-
- void ProcessOnConnect(const std::string& username);
- void ProcessOnLastDisconnect();
+ void ProcessOnClientAuthenticated(const std::string& username);
+ void ProcessOnClientDisconnected();
void MonitorLocalInputs(bool enable);
@@ -119,6 +117,10 @@ class It2MeHostUserInterface : public HostStatusObserver {
// is connected).
std::string authenticated_jid_;
+ // Event to allow the On* callbacks to block until their counterparts on the
+ // UI thread have completed.
+ base::WaitableEvent callback_complete_;
+
DISALLOW_COPY_AND_ASSIGN(It2MeHostUserInterface);
};
« no previous file with comments | « no previous file | remoting/host/it2me_host_user_interface.cc » ('j') | remoting/host/it2me_host_user_interface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698