summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_http_job.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 03:49:17 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 03:49:17 +0000
commit1638d605a0f616cbdc1ac7c9fdb6422426808df5 (patch)
treed43290491a2d8516df387994ff45ed9af030b5d3 /net/url_request/url_request_http_job.cc
parent559506ebab6e2aa5aa23e9776774bcdaf1901fe2 (diff)
downloadchromium_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/url_request_http_job.cc')
-rw-r--r--net/url_request/url_request_http_job.cc11
1 files changed, 4 insertions, 7 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