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

Unified Diff: remoting/host/dns_blackhole_checker.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/daemon_process.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/dns_blackhole_checker.cc
diff --git a/remoting/host/dns_blackhole_checker.cc b/remoting/host/dns_blackhole_checker.cc
index 745481ee46f012a9341c045068b7e1f5b41eb8ac..b5094c5af20f256b2cba6d0337252cf846791f2f 100644
--- a/remoting/host/dns_blackhole_checker.cc
+++ b/remoting/host/dns_blackhole_checker.cc
@@ -4,6 +4,7 @@
#include "remoting/host/dns_blackhole_checker.h"
+#include "base/callback_helpers.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/logging.h"
@@ -40,8 +41,8 @@ void DnsBlackholeChecker::OnURLFetchComplete(const net::URLFetcher* source) {
HOST_LOG << "Unable to connect to host talkgadget (" << response << ")";
}
url_fetcher_.reset(nullptr);
- callback_.Run(allow);
- callback_.Reset();
+
Wez 2015/04/24 23:02:31 nit: No need for this blank line
Sergey Ulanov 2015/04/24 23:30:00 Done.
+ base::ResetAndReturn(&callback_).Run(allow);
}
void DnsBlackholeChecker::CheckForDnsBlackhole(
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698