diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 03:49:17 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 03:49:17 +0000 |
commit | 1638d605a0f616cbdc1ac7c9fdb6422426808df5 (patch) | |
tree | d43290491a2d8516df387994ff45ed9af030b5d3 /net/url_request | |
parent | 559506ebab6e2aa5aa23e9776774bcdaf1901fe2 (diff) | |
download | chromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.zip chromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.tar.gz chromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.tar.bz2 |
Replace some net::ERR_FAILED generic error codes with more specific codes.
The goal is to end up with more meaningful errors if a page fails to load.
BUG=22623
Review URL: http://codereview.chromium.org/222009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_http_job.cc | 11 | ||||
-rw-r--r-- | net/url_request/url_request_job.cc | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 8d71b36..387f488 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -564,21 +564,18 @@ void URLRequestHttpJob::StartTransaction() { DCHECK(request_->context()); DCHECK(request_->context()->http_transaction_factory()); - transaction_.reset( - request_->context()->http_transaction_factory()->CreateTransaction()); - // No matter what, we want to report our status as IO pending since we will // be notifying our consumer asynchronously via OnStartCompleted. SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); - int rv; - if (transaction_.get()) { + int rv = request_->context()->http_transaction_factory()->CreateTransaction( + &transaction_); + + if (rv == net::OK) { rv = transaction_->Start( &request_info_, &start_callback_, request_->load_log()); if (rv == net::ERR_IO_PENDING) return; - } else { - rv = net::ERR_FAILED; } // The transaction started synchronously, but we need to notify the diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index b84fdd5..63611fd 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc @@ -302,8 +302,8 @@ bool URLRequestJob::ReadFilteredData(int *bytes_read) { } case Filter::FILTER_ERROR: { filter_needs_more_output_space_ = false; - // TODO(jar): Figure out a better error code. - NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, net::ERR_FAILED)); + NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, + net::ERR_CONTENT_DECODING_FAILED)); rv = false; break; } |