summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 04:43:44 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 04:43:44 +0000
commitd1372e40d31a83071a54208536043e0fbd6df048 (patch)
treef634dbb9e25bc2b18ca2904eda6bdb0c1b608e73 /webkit/blob
parent63cda0c1ef4637c345c286e72c5e4af9e4f94fb0 (diff)
downloadchromium_src-d1372e40d31a83071a54208536043e0fbd6df048.zip
chromium_src-d1372e40d31a83071a54208536043e0fbd6df048.tar.gz
chromium_src-d1372e40d31a83071a54208536043e0fbd6df048.tar.bz2
Make BlobURLRequestJob::Start to continue asynchronously no matter what. This
solves the problem when testing error cases in test shell. BUG=none TEST=none Review URL: http://codereview.chromium.org/3218013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r--webkit/blob/blob_url_request_job.cc10
-rw-r--r--webkit/blob/blob_url_request_job.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc
index 5103458..62712d5 100644
--- a/webkit/blob/blob_url_request_job.cc
+++ b/webkit/blob/blob_url_request_job.cc
@@ -65,6 +65,12 @@ BlobURLRequestJob::~BlobURLRequestJob() {
}
void BlobURLRequestJob::Start() {
+ // Continue asynchronously.
+ MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
+ this, &BlobURLRequestJob::DidStart));
+}
+
+void BlobURLRequestJob::DidStart() {
// We only support GET request per the spec.
if (request()->method() != "GET") {
NotifyFailure(net::ERR_METHOD_NOT_SUPPORTED);
@@ -77,9 +83,7 @@ void BlobURLRequestJob::Start() {
return;
}
- // Continue asynchronously.
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &BlobURLRequestJob::CountSize));
+ CountSize();
}
void BlobURLRequestJob::Kill() {
diff --git a/webkit/blob/blob_url_request_job.h b/webkit/blob/blob_url_request_job.h
index 5445774..780a642 100644
--- a/webkit/blob/blob_url_request_job.h
+++ b/webkit/blob/blob_url_request_job.h
@@ -57,6 +57,7 @@ class BlobURLRequestJob : public URLRequestJob {
void NotifySuccess();
void NotifyFailure(int);
+ void DidStart();
void DidResolve(base::PlatformFileError rv,
const file_util::FileInfo& file_info);
void DidRead(int result);