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

Unified Diff: content/browser/net/url_request_failed_dns_job.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
Index: content/browser/net/url_request_failed_dns_job.cc
diff --git a/content/browser/net/url_request_failed_dns_job.cc b/content/browser/net/url_request_failed_dns_job.cc
index bffb1212d62bec4916d92bb6bf84631fe9d4d7e1..754804c92c8e019962829a379258fbb427c0f440 100644
--- a/content/browser/net/url_request_failed_dns_job.cc
+++ b/content/browser/net/url_request_failed_dns_job.cc
@@ -4,6 +4,7 @@
#include "content/browser/net/url_request_failed_dns_job.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "googleurl/src/gurl.h"
@@ -16,15 +17,15 @@ const char URLRequestFailedDnsJob::kTestUrl[] =
URLRequestFailedDnsJob::URLRequestFailedDnsJob(net::URLRequest* request)
: net::URLRequestJob(request),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {}
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {}
URLRequestFailedDnsJob::~URLRequestFailedDnsJob() {}
void URLRequestFailedDnsJob::Start() {
MessageLoop::current()->PostTask(
FROM_HERE,
- method_factory_.NewRunnableMethod(
- &URLRequestFailedDnsJob::StartAsync));
+ base::Bind(&URLRequestFailedDnsJob::StartAsync,
+ weak_factory_.GetWeakPtr()));
}
// static
« no previous file with comments | « content/browser/net/url_request_failed_dns_job.h ('k') | content/browser/net/url_request_slow_download_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698