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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 5556004: Fix URLRequestHttpJob to use ScopedRunnableMethodFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 70e43fe74d582afc8195254e5e698bd604208587..fb75bde0439eefff6207b0609c2066d6c0b9db91 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -98,7 +98,8 @@ URLRequestHttpJob::URLRequestHttpJob(net::URLRequest* request)
sdch_dictionary_advertised_(false),
sdch_test_activated_(false),
sdch_test_control_(false),
- is_cached_content_(false) {
+ is_cached_content_(false),
+ ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
URLRequestHttpJob::~URLRequestHttpJob() {
@@ -369,8 +370,10 @@ void URLRequestHttpJob::CancelAuth() {
//
// We have to do this via InvokeLater to avoid "recursing" the consumer.
//
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &URLRequestHttpJob::OnStartCompleted, net::OK));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(
+ &URLRequestHttpJob::OnStartCompleted, net::OK));
eroman 2010/12/03 06:03:19 nit: indent by 4
}
void URLRequestHttpJob::ContinueWithCertificate(
@@ -389,8 +392,10 @@ void URLRequestHttpJob::ContinueWithCertificate(
// The transaction started synchronously, but we need to notify the
// net::URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &URLRequestHttpJob::OnStartCompleted, rv));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(
+ &URLRequestHttpJob::OnStartCompleted, rv));
}
void URLRequestHttpJob::ContinueDespiteLastError() {
@@ -410,8 +415,10 @@ void URLRequestHttpJob::ContinueDespiteLastError() {
// The transaction started synchronously, but we need to notify the
// net::URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &URLRequestHttpJob::OnStartCompleted, rv));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(
+ &URLRequestHttpJob::OnStartCompleted, rv));
}
bool URLRequestHttpJob::ReadRawData(net::IOBuffer* buf, int buf_size,
@@ -660,8 +667,10 @@ void URLRequestHttpJob::StartTransaction() {
// The transaction started synchronously, but we need to notify the
// net::URLRequest delegate via the message loop.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &URLRequestHttpJob::OnStartCompleted, rv));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(
+ &URLRequestHttpJob::OnStartCompleted, rv));
}
void URLRequestHttpJob::AddExtraHeaders() {
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698