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

Unified Diff: remoting/host/desktop_session_agent.cc

Issue 569593002: Maintaining the proper order of initialization WeakPtrFactory in "src/remoting" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 3 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
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();

Powered by Google App Engine
This is Rietveld 408576698