| Index: remoting/client/chromoting_client.h
|
| diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
|
| index d784b5a59c5a18b3fbff36ecd647fff4584d3636..7b90be3cb5f76c6320e715bf720218bc70c1072a 100644
|
| --- a/remoting/client/chromoting_client.h
|
| +++ b/remoting/client/chromoting_client.h
|
| @@ -10,8 +10,8 @@
|
| #include <list>
|
|
|
| #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,7 +120,9 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
|
| // Keep track of the last sequence number bounced back from the host.
|
| int64 last_sequence_number_;
|
|
|
| - ScopedThreadProxy thread_proxy_;
|
| + // WeakPtr used to avoid tasks accessing the client after it is deleted.
|
| + base::WeakPtrFactory<ChromotingClient> weak_factory_;
|
| + base::WeakPtr<ChromotingClient> weak_ptr_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChromotingClient);
|
| };
|
|
|