Use in-class initializers for base::WeakPtrFactory (remaining uses on Windows).
Changed NULL to nullptr where the presubmit complained (due to new line wrapping).
Generated by: https://chromium-review.googlesource.com/c/chromium/src/+/1689216
Bug: 981415
Tbr: [email protected]
Change-Id: I1f9c781cd980150ad1eecee9342be2e3116617b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763040
Reviewed-by: Jeremy Roman <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Bruce Dawson <[email protected]>
Commit-Queue: Jeremy Roman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#689209}
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc
index 54c3e7b..2473889 100644
--- a/remoting/host/desktop_session_win.cc
+++ b/remoting/host/desktop_session_win.cc
@@ -210,7 +210,7 @@
// Used to match |rdp_desktop_session_| with the session it is attached to.
std::string terminal_id_;
- base::WeakPtrFactory<RdpSession> weak_factory_;
+ base::WeakPtrFactory<RdpSession> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(RdpSession);
};
@@ -244,16 +244,16 @@
LOG(ERROR) << "Failed to inject Secure Attention Sequence.";
}
-RdpSession::RdpSession(
- scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
- scoped_refptr<AutoThreadTaskRunner> io_task_runner,
- DaemonProcess* daemon_process,
- int id,
- WtsTerminalMonitor* monitor)
- : DesktopSessionWin(caller_task_runner, io_task_runner, daemon_process, id,
- monitor),
- weak_factory_(this) {
-}
+RdpSession::RdpSession(scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> io_task_runner,
+ DaemonProcess* daemon_process,
+ int id,
+ WtsTerminalMonitor* monitor)
+ : DesktopSessionWin(caller_task_runner,
+ io_task_runner,
+ daemon_process,
+ id,
+ monitor) {}
RdpSession::~RdpSession() {
}