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

Unified Diff: remoting/host/register_support_host_request.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/register_support_host_request.cc
diff --git a/remoting/host/register_support_host_request.cc b/remoting/host/register_support_host_request.cc
index c0a80d1ac4eede335cc1f86b9164eb9f7298e857..b1bdd418c10298c6bbfffe780c2a7680fdf369f1 100644
--- a/remoting/host/register_support_host_request.cc
+++ b/remoting/host/register_support_host_request.cc
@@ -5,6 +5,7 @@
#include "remoting/host/register_support_host_request.h"
#include "base/bind.h"
+#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
@@ -178,9 +179,7 @@ void RegisterSupportHostRequest::CallCallback(
signal_strategy_->RemoveListener(this);
signal_strategy_ = nullptr;
- RegisterCallback callback = callback_;
- callback_.Reset();
- callback.Run(success, support_id, lifetime);
+ base::ResetAndReturn(&callback_).Run(success, support_id, lifetime);
}
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698