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

Unified Diff: chrome/browser/net/predictor.cc

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 1 month 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 | « chrome/browser/net/network_stats.cc ('k') | content/browser/renderer_host/p2p/socket_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 51bc4aecaca3ee190d6db10ba4a9677ff48994f9..365e7e13b48da6cf704929e30a9ec6a0d1ffc76e 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -82,9 +82,7 @@ class Predictor::LookupRequest {
LookupRequest(Predictor* predictor,
net::HostResolver* host_resolver,
const GURL& url)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- net_callback_(this, &LookupRequest::OnLookupFinished)),
- predictor_(predictor),
+ : predictor_(predictor),
url_(url),
resolver_(host_resolver) {
}
@@ -102,7 +100,9 @@ class Predictor::LookupRequest {
// lets the HostResolver know it can de-prioritize it.
resolve_info.set_is_speculative(true);
return resolver_.Resolve(
- resolve_info, &addresses_, &net_callback_, net::BoundNetLog());
+ resolve_info, &addresses_,
+ base::Bind(&LookupRequest::OnLookupFinished, base::Unretained(this)),
+ net::BoundNetLog());
}
private:
@@ -110,9 +110,6 @@ class Predictor::LookupRequest {
predictor_->OnLookupFinished(this, url_, result == net::OK);
}
- // HostResolver will call us using this callback when resolution is complete.
- net::OldCompletionCallbackImpl<LookupRequest> net_callback_;
-
Predictor* predictor_; // The predictor which started us.
const GURL url_; // Hostname to resolve.
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | content/browser/renderer_host/p2p/socket_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698