From b6791a77ae5c2eec843b8c9b4ad3d9fa9c11fda7 Mon Sep 17 00:00:00 2001 From: "wez@chromium.org" Date: Wed, 30 May 2012 21:09:33 +0000 Subject: Revert 139623 - Replace ScopedThreadProxy with MessageLoopProxy & WeakPtrs. This affects the following classes: * ChromotingClient * ChromotingInstance * HostUserInterface * It2MeHostUserInterface The MessageLoopProxy/WeakPtr combination requires that the WeakPtr is created on the thread referred to by the proxy; code in which that is hard to arrange usually has subtle race-conditions. TEST=Existing unit-tests, and manual testing. Review URL: https://chromiumcodereview.appspot.com/10454040 TBR=wez@chromium.org Review URL: https://chromiumcodereview.appspot.com/10446088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139633 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/client/chromoting_client.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'remoting/client/chromoting_client.h') diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index 7b90be3..d784b5a 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h @@ -10,8 +10,8 @@ #include #include "base/callback.h" -#include "base/memory/weak_ptr.h" #include "base/time.h" +#include "remoting/base/scoped_thread_proxy.h" #include "remoting/client/client_config.h" #include "remoting/client/chromoting_stats.h" #include "remoting/client/chromoting_view.h" @@ -120,9 +120,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, // Keep track of the last sequence number bounced back from the host. int64 last_sequence_number_; - // WeakPtr used to avoid tasks accessing the client after it is deleted. - base::WeakPtrFactory weak_factory_; - base::WeakPtr weak_ptr_; + ScopedThreadProxy thread_proxy_; DISALLOW_COPY_AND_ASSIGN(ChromotingClient); }; -- cgit v1.1