| Index: remoting/host/security_key/fake_remote_security_key_ipc_client.cc
|
| diff --git a/remoting/host/security_key/fake_remote_security_key_ipc_client.cc b/remoting/host/security_key/fake_remote_security_key_ipc_client.cc
|
| index fc655ddf3d784b59d8d63a7ee5e7ede6024c087e..6c70737f59ce933fa62302e244799d94259b3bb2 100644
|
| --- a/remoting/host/security_key/fake_remote_security_key_ipc_client.cc
|
| +++ b/remoting/host/security_key/fake_remote_security_key_ipc_client.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/run_loop.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "ipc/ipc_channel.h"
|
| @@ -18,12 +19,17 @@ namespace remoting {
|
|
|
| FakeRemoteSecurityKeyIpcClient::FakeRemoteSecurityKeyIpcClient(
|
| const base::Closure& channel_event_callback)
|
| - : channel_event_callback_(channel_event_callback) {
|
| + : channel_event_callback_(channel_event_callback), weak_factory_(this) {
|
| DCHECK(!channel_event_callback_.is_null());
|
| }
|
|
|
| FakeRemoteSecurityKeyIpcClient::~FakeRemoteSecurityKeyIpcClient() {}
|
|
|
| +base::WeakPtr<FakeRemoteSecurityKeyIpcClient>
|
| +FakeRemoteSecurityKeyIpcClient::AsWeakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| +}
|
| +
|
| bool FakeRemoteSecurityKeyIpcClient::WaitForSecurityKeyIpcServerChannel() {
|
| return wait_for_ipc_channel_return_value_;
|
| }
|
|
|