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

Unified Diff: remoting/host/setup/oauth_client.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/setup/oauth_client.cc
diff --git a/remoting/host/setup/oauth_client.cc b/remoting/host/setup/oauth_client.cc
index 684ab2c2d84e4cdc99b3424bdf5a62a7d0a5196d..a68a0201a40d7405ce28ca24d89f181f25530edc 100644
--- a/remoting/host/setup/oauth_client.cc
+++ b/remoting/host/setup/oauth_client.cc
@@ -4,6 +4,7 @@
#include "remoting/host/setup/oauth_client.h"
+#include "base/callback_helpers.h"
#include "base/logging.h"
namespace {
@@ -54,9 +55,7 @@ void OAuthClient::OnRefreshTokenResponse(
void OAuthClient::SendResponse(const std::string& user_email,
const std::string& refresh_token) {
- CompletionCallback on_done = on_done_;
- on_done_.Reset();
- on_done.Run(user_email, refresh_token);
+ base::ResetAndReturn(&on_done_).Run(user_email, refresh_token);
// Process the next request in the queue.
if (pending_requests_.size()) {

Powered by Google App Engine
This is Rietveld 408576698