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

Unified Diff: chrome/browser/net/network_stats.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.h ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/network_stats.cc
diff --git a/chrome/browser/net/network_stats.cc b/chrome/browser/net/network_stats.cc
index 210bc15a847aea7606cfdf67955d7c1823cfd1da..1892a4e11bf88b71e72e05e19b5f78a8fb19b4f6 100644
--- a/chrome/browser/net/network_stats.cc
+++ b/chrome/browser/net/network_stats.cc
@@ -82,8 +82,6 @@ NetworkStats::NetworkStats()
bytes_to_send_(0),
encoded_message_(""),
ALLOW_THIS_IN_INITIALIZER_LIST(
- resolve_callback_(this, &NetworkStats::OnResolveComplete)),
- ALLOW_THIS_IN_INITIALIZER_LIST(
read_callback_(this, &NetworkStats::OnReadComplete)),
ALLOW_THIS_IN_INITIALIZER_LIST(
write_callback_(this, &NetworkStats::OnWriteComplete)),
@@ -105,11 +103,11 @@ bool NetworkStats::Start(net::HostResolver* host_resolver,
Initialize(bytes_to_send, finished_callback);
net::HostResolver::RequestInfo request(server_host_port_pair);
- int rv = host_resolver->Resolve(request,
- &addresses_,
- &resolve_callback_,
- NULL,
- net::BoundNetLog());
+ int rv = host_resolver->Resolve(
+ request, &addresses_,
+ base::Bind(&NetworkStats::OnResolveComplete,
+ base::Unretained(this)),
+ NULL, net::BoundNetLog());
if (rv == net::ERR_IO_PENDING)
return true;
return DoConnect(rv);
« no previous file with comments | « chrome/browser/net/network_stats.h ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698