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

Unified Diff: remoting/client/token_fetcher_proxy.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 | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/daemon_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/token_fetcher_proxy.cc
diff --git a/remoting/client/token_fetcher_proxy.cc b/remoting/client/token_fetcher_proxy.cc
index c1082b2d427050621df7b1ba380dc8f384a221ef..10792907fcdcb20c61a51b08ab3415ba66602a88 100644
--- a/remoting/client/token_fetcher_proxy.cc
+++ b/remoting/client/token_fetcher_proxy.cc
@@ -4,6 +4,8 @@
#include "remoting/client/token_fetcher_proxy.h"
+#include "base/callback_helpers.h"
+
namespace remoting {
TokenFetcherProxy::TokenFetcherProxy(
@@ -29,8 +31,7 @@ void TokenFetcherProxy::FetchThirdPartyToken(
void TokenFetcherProxy::OnTokenFetched(
const std::string& token, const std::string& shared_secret) {
if (!token_fetched_callback_.is_null()) {
- token_fetched_callback_.Run(token, shared_secret);
- token_fetched_callback_.Reset();
+ base::ResetAndReturn(&token_fetched_callback_).Run(token, shared_secret);
}
}
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/daemon_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698