summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc2
-rw-r--r--net/url_request/url_request.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 8f1e329..073528c 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -1000,7 +1000,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) {
// If enqueing/starting this request will exceed our per-process memory
// bound, abort it right away.
if (memory_cost > max_outstanding_requests_cost_per_process_) {
- // We call "CancelWithError()" as a way of setting the URLRequest's
+ // We call "SimulateError()" as a way of setting the URLRequest's
// status -- it has no effect beyond this, since the request hasn't started.
request->SimulateError(net::ERR_INSUFFICIENT_RESOURCES);
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 16a3286..4f65f14 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -377,7 +377,9 @@ class URLRequest {
// This method may be called at any time after Start() has been called to
// cancel the request. This method may be called many times, and it has
- // no effect once the response has completed.
+ // no effect once the response has completed. It is guaranteed that no
+ // methods of the delegate will be called after the request has been
+ // cancelled, including during the call to Cancel itself.
void Cancel();
// Cancels the request and sets the error to |os_error| (see net_error_list.h
@@ -396,8 +398,8 @@ class URLRequest {
// If data is available, Read will return true, and the data and length will
// be returned immediately. If data is not available, Read returns false,
// and an asynchronous Read is initiated. The Read is finished when
- // the caller receives the OnReadComplete callback. OnReadComplete will be
- // always be called, even if there was a failure.
+ // the caller receives the OnReadComplete callback. Unless the request was
+ // cancelled, OnReadComplete will always be called, even if the read failed.
//
// The buf parameter is a buffer to receive the data. If the operation
// completes asynchronously, the implementation will reference the buffer