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

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
« no previous file with comments | « remoting/host/setup/host_starter.cc ('k') | remoting/protocol/fake_authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/oauth_client.cc
diff --git a/remoting/host/setup/oauth_client.cc b/remoting/host/setup/oauth_client.cc
index d96d360ec0cce6be69e97336e8ce16577edb6ecb..fae80219c8ae7de4315aee57da3594e0ca89dda2 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 {
@@ -61,9 +62,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()) {
« no previous file with comments | « remoting/host/setup/host_starter.cc ('k') | remoting/protocol/fake_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698