Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: net/url_request/url_request_job.cc

Issue 1273813005: Revert of Fix cancellation of a pair of URLRequestJob subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_http_job_unittest.cc ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.cc
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 8d0b23a01f3a20e48a7fb33cc65198f57923952d..14c5c8f00adb08a0eb5d8bf2909d6187c6c7f18a 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -378,9 +378,7 @@
if (has_handled_response_)
return;
- // This should not be called on error, and the job type should have cleared
- // IO_PENDING state before calling this method.
- DCHECK(request_->status().is_success());
+ DCHECK(!request_->status().is_io_pending());
// Initialize to the current time, and let the subclass optionally override
// the time stamps if it has that information. The default request_time is
@@ -763,12 +761,8 @@
}
void URLRequestJob::SetStatus(const URLRequestStatus &status) {
- if (request_) {
- // A URLRequestJob should not replace a failed or cancelled status.
- DCHECK(request_->status().is_success() ||
- request_->status().is_io_pending());
+ if (request_)
request_->set_status(status);
- }
}
void URLRequestJob::SetProxyServer(const HostPortPair& proxy_server) {
« no previous file with comments | « net/url_request/url_request_http_job_unittest.cc ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698