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

Unified Diff: remoting/host/local_input_monitor_mac.mm

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_mac.mm
diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm
index 2077a96dfcd377f9d030c4e19febdb22585d2f86..132a0d05a4b1929a4cb3b95ce01805fe10ef2d27 100644
--- a/remoting/host/local_input_monitor_mac.mm
+++ b/remoting/host/local_input_monitor_mac.mm
@@ -12,6 +12,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "remoting/host/chromoting_host.h"
#import "third_party/GTM/AppKit/GTMCarbonEvent.h"
@@ -21,7 +22,7 @@
static const NSUInteger kEscKeyCode = 53;
namespace {
-typedef std::set<remoting::ChromotingHost*> Hosts;
+typedef std::set<scoped_refptr<remoting::ChromotingHost> > Hosts;
}
@interface LocalInputMonitorImpl : NSObject {

Powered by Google App Engine
This is Rietveld 408576698