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

Unified Diff: remoting/client/plugin/chromoting_instance.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
« no previous file with comments | « no previous file | remoting/client/token_fetcher_proxy.cc » ('j') | remoting/host/dns_blackhole_checker.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 9572bc401ba4921ef0d81f64ac6d267066106ff5..3faab96508cb0a30d58ea19e0c8a17d3bba03919 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -14,6 +14,7 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
@@ -905,8 +906,7 @@ void ChromotingInstance::HandleOnPinFetched(const base::DictionaryValue& data) {
return;
}
if (!secret_fetched_callback_.is_null()) {
- secret_fetched_callback_.Run(pin);
- secret_fetched_callback_.Reset();
+ base::ResetAndReturn(&secret_fetched_callback_).Run(pin);
} else {
LOG(WARNING) << "Ignored OnPinFetched received without a pending fetch.";
}
« no previous file with comments | « no previous file | remoting/client/token_fetcher_proxy.cc » ('j') | remoting/host/dns_blackhole_checker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698