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

Unified Diff: remoting/host/daemon_process.cc

Issue 1064863004: Use base::ResetAndReturn() in remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/daemon_process.cc
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index 8c9ebbb29e415fd310f1e2d4d238b675f2d5217b..e08677a0ec16961ecb1aaece0b919221b2f389ec 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -285,9 +286,7 @@ void DaemonProcess::Stop() {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
if (!stopped_callback_.is_null()) {
- base::Closure stopped_callback = stopped_callback_;
- stopped_callback_.Reset();
- stopped_callback.Run();
+ base::ResetAndReturn(&stopped_callback_).Run();
}
}

Powered by Google App Engine
This is Rietveld 408576698