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

Unified Diff: remoting/host/host_user_interface.h

Issue 10440107: Replace ScopedThreadProxy with MessageLoopProxy & WeakPtrs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use correct TaskRunner reference, and copy instance reference in lock. Created 8 years, 6 months 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/client/plugin/chromoting_instance.cc ('k') | remoting/host/host_user_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_user_interface.h
diff --git a/remoting/host/host_user_interface.h b/remoting/host/host_user_interface.h
index 9c2729ee01253f817c424b306e5ff0a60a4551ca..942cd2a2b920241c0ec0e563464b7d18a5b991e2 100644
--- a/remoting/host/host_user_interface.h
+++ b/remoting/host/host_user_interface.h
@@ -11,8 +11,8 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-
-#include "remoting/base/scoped_thread_proxy.h"
+#include "base/memory/weak_ptr.h"
+#include "base/message_loop_proxy.h"
#include "remoting/host/host_status_observer.h"
namespace remoting {
@@ -95,7 +95,9 @@ class HostUserInterface : public HostStatusObserver {
bool is_monitoring_local_inputs_;
- ScopedThreadProxy ui_thread_proxy_;
+ // WeakPtr used to avoid tasks accessing the client after it is deleted.
+ base::WeakPtrFactory<HostUserInterface> weak_factory_;
+ base::WeakPtr<HostUserInterface> weak_ptr_;
DISALLOW_COPY_AND_ASSIGN(HostUserInterface);
};
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/host_user_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698