Index: remoting/host/desktop_session_agent.cc |
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc |
index 4a1f259010f70e0a551acac0f1aa59c29a640a76..fd01bfd3f7cade69703aaa3440337ab17c8f1d43 100644 |
--- a/remoting/host/desktop_session_agent.cc |
+++ b/remoting/host/desktop_session_agent.cc |
@@ -120,10 +120,10 @@ DesktopSessionAgent::DesktopSessionAgent( |
input_task_runner_(input_task_runner), |
io_task_runner_(io_task_runner), |
video_capture_task_runner_(video_capture_task_runner), |
- control_factory_(this), |
next_shared_buffer_id_(1), |
shared_buffers_(0), |
- started_(false) { |
+ started_(false), |
+ weak_factory_(this) { |
DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
} |
@@ -268,7 +268,7 @@ void DesktopSessionAgent::OnStartSessionAgent( |
// Create a desktop environment for the new session. |
desktop_environment_ = delegate_->desktop_environment_factory().Create( |
- control_factory_.GetWeakPtr()); |
+ weak_factory_.GetWeakPtr()); |
// Create the session controller and set the initial screen resolution. |
screen_controls_ = desktop_environment_->CreateScreenControls(); |
@@ -407,7 +407,7 @@ void DesktopSessionAgent::Stop() { |
started_ = false; |
// Ignore any further callbacks. |
- control_factory_.InvalidateWeakPtrs(); |
+ weak_factory_.InvalidateWeakPtrs(); |
client_jid_.clear(); |
remote_input_filter_.reset(); |