summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authormmenke <mmenke@chromium.org>2016-01-22 15:18:20 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 23:19:24 +0000
commit0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444 (patch)
tree7384c72bb87f2125df0711b5ff8162ac6f0dc552 /storage
parent6ce02b6ce1269c206f8d902abb1571b39e773e7e (diff)
downloadchromium_src-0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444.zip
chromium_src-0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444.tar.gz
chromium_src-0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444.tar.bz2
Make URLRequestJob::SetStatus private.
Recent CLs have already made it so URLRequestJob itself calls the method itself whenever necessary, except when URLRequestJob::Start is being called, where subclasses were still expected to invoke it. Most of them were failing to do so, but since nothing cares about the state after start, and little distinguished between ERR_IO_PENDING and SUCCESS, everything was still working. URLRequest now sets its status itself before it starts a URLRequestJob. This CL also makes the URLRequest consistently have a status of ERR_IO_PENDING when it's doing something - there were a number of paths where this wasn't previously the case. The state machine changes also coincidentally fix issue 575213, which regressed in https://codereview.chromium.org/1467603002, so this CL includes a test for that fix. In the future, I'd really like to get rid of URLRequestJob::SetStatus, and have URLRequests manage their own status. BUG=564250,575213 TBR=jianli@chromium.org, phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/1563633002 Cr-Commit-Position: refs/heads/master@{#371072}
Diffstat (limited to 'storage')
-rw-r--r--storage/browser/blob/blob_url_request_job.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/storage/browser/blob/blob_url_request_job.cc b/storage/browser/blob/blob_url_request_job.cc
index 783c386..58863d0 100644
--- a/storage/browser/blob/blob_url_request_job.cc
+++ b/storage/browser/blob/blob_url_request_job.cc
@@ -177,7 +177,6 @@ void BlobURLRequestJob::DidStart() {
NotifyFailure(blob_reader_->net_error());
return;
case BlobReader::Status::IO_PENDING:
- SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
return;
case BlobReader::Status::DONE:
DidCalculateSize(net::OK);
@@ -188,8 +187,6 @@ void BlobURLRequestJob::DidStart() {
void BlobURLRequestJob::DidCalculateSize(int result) {
TRACE_EVENT_ASYNC_END1("Blob", "BlobRequest::CountSize", this, "uuid",
blob_handle_->uuid());
- // Clear the IO_PENDING status
- SetStatus(net::URLRequestStatus());
if (result != net::OK) {
NotifyFailure(result);