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

Unified Diff: net/url_request/url_request.cc

Issue 18541: Add a constraint on how many requests can be outstanding for any given render (browser-side). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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.h ('k') | net/url_request/url_request_test_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 9239)
+++ net/url_request/url_request.cc (working copy)
@@ -234,10 +234,6 @@
void URLRequest::CancelWithError(int os_error) {
DCHECK(os_error < 0);
- // There's nothing to do if we are not waiting on a Job.
- if (!is_pending_ || !job_)
- return;
-
// If the URL request already has an error status, then canceling is a no-op.
// Plus, we don't want to change the error status once it has been set.
if (status_.is_success()) {
@@ -245,6 +241,10 @@
status_.set_os_error(os_error);
}
+ // There's nothing to do if we are not waiting on a Job.
+ if (!is_pending_ || !job_)
+ return;
+
job_->Kill();
// The Job will call our NotifyDone method asynchronously. This is done so
@@ -350,7 +350,7 @@
method_ = "GET";
}
url_ = location;
- upload_ = 0;
+ upload_ = NULL;
status_ = URLRequestStatus();
--redirect_limit_;
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_test_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698