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

Unified Diff: remoting/host/local_input_monitor_thread_win.h

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
Index: remoting/host/local_input_monitor_thread_win.h
diff --git a/remoting/host/local_input_monitor_thread_win.h b/remoting/host/local_input_monitor_thread_win.h
index 0080628347445e4d3261155747adc4331e586744..ff103cb7f9358f7e95776067b0ebec6efe00cffd 100644
--- a/remoting/host/local_input_monitor_thread_win.h
+++ b/remoting/host/local_input_monitor_thread_win.h
@@ -8,6 +8,7 @@
#include <set>
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/threading/simple_thread.h"
#include "remoting/host/chromoting_host.h"
@@ -35,7 +36,7 @@ class LocalInputMonitorThread : public base::SimpleThread {
LPARAM event_data);
base::Lock hosts_lock_;
- typedef std::set<ChromotingHost*> ChromotingHosts;
+ typedef std::set<scoped_refptr<ChromotingHost> > ChromotingHosts;
ChromotingHosts hosts_;
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorThread);

Powered by Google App Engine
This is Rietveld 408576698