diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 22:44:27 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 22:44:27 +0000 |
commit | 649f3a5d65594046164d0bc44acae34e8d7a8e5b (patch) | |
tree | eab9f43c98818b20fd387e79e34d2b7b0e6ec003 /net | |
parent | 896248f1ab882604493c6069752f045af8fa6f5f (diff) | |
download | chromium_src-649f3a5d65594046164d0bc44acae34e8d7a8e5b.zip chromium_src-649f3a5d65594046164d0bc44acae34e8d7a8e5b.tar.gz chromium_src-649f3a5d65594046164d0bc44acae34e8d7a8e5b.tar.bz2 |
Update some comments in url_request.h to clarify that once the request is deleted/cancelled, the delegate should never be called again.
(The text added to URLRequest::Cancel() was copied from URLRequest::~URLRequest()).
The comment change in resource_dispatcher_host.cc is an unrelated name fix.
TEST=0
BUG=0
Review URL: http://codereview.chromium.org/118151
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/url_request/url_request.h | 8 |
1 files changed, 5 insertions, 3 deletions
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 |