summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_about_job.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-19 02:15:19 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-19 02:15:19 +0000
commitb9114d5e9104f29512c7cbc7cbe5a07f727c3180 (patch)
treefe50546eec955206836bdfcd4bf42daaff2967de /net/url_request/url_request_about_job.cc
parentd46c48484879ed310a0cddc161ec6cd5f2811222 (diff)
downloadchromium_src-b9114d5e9104f29512c7cbc7cbe5a07f727c3180.zip
chromium_src-b9114d5e9104f29512c7cbc7cbe5a07f727c3180.tar.gz
chromium_src-b9114d5e9104f29512c7cbc7cbe5a07f727c3180.tar.bz2
Change some URLRequestJob subclasses to use ScopedRunnableMethodFactory.
This is a step towards not refcounting URLRequestJobs. BUG=none TEST=none Review URL: http://codereview.chromium.org/6713054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_about_job.cc')
-rw-r--r--net/url_request/url_request_about_job.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/url_request/url_request_about_job.cc b/net/url_request/url_request_about_job.cc
index f48e72a..2ef7ad5 100644
--- a/net/url_request/url_request_about_job.cc
+++ b/net/url_request/url_request_about_job.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,12 +8,14 @@
#include "net/url_request/url_request_about_job.h"
+#include "base/compiler_specific.h"
#include "base/message_loop.h"
namespace net {
URLRequestAboutJob::URLRequestAboutJob(URLRequest* request)
- : URLRequestJob(request) {
+ : URLRequestJob(request),
+ ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
// static
@@ -25,8 +27,9 @@ URLRequestJob* URLRequestAboutJob::Factory(URLRequest* request,
void URLRequestAboutJob::Start() {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &URLRequestAboutJob::StartAsync));
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(&URLRequestAboutJob::StartAsync));
}
bool URLRequestAboutJob::GetMimeType(std::string* mime_type) const {