summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 19:30:52 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 19:30:52 +0000
commit698d13fbcbedca85bfd84ae88571b804920f556e (patch)
treea97ecde558b9ec90803c9161c010bcf63870ae8c
parent7882985b55298d945dbcd16f2bbbdf82e8421f8a (diff)
downloadchromium_src-698d13fbcbedca85bfd84ae88571b804920f556e.zip
chromium_src-698d13fbcbedca85bfd84ae88571b804920f556e.tar.gz
chromium_src-698d13fbcbedca85bfd84ae88571b804920f556e.tar.bz2
Clarify ResourceHandler::OnWillRead's documentation.
Document the min_size argument and clarify buffer lifetimes to match how BufferedResourceHandler uses it. BUG=none Review URL: https://codereview.chromium.org/273683007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270163 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/loader/resource_handler.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/browser/loader/resource_handler.h b/content/browser/loader/resource_handler.h
index ded3a35..e47aa81 100644
--- a/content/browser/loader/resource_handler.h
+++ b/content/browser/loader/resource_handler.h
@@ -84,8 +84,11 @@ class CONTENT_EXPORT ResourceHandler
// Data will be read for the response. Upon success, this method places the
// size and address of the buffer where the data is to be written in its
- // out-params. This call will be followed by either OnReadCompleted or
- // OnResponseCompleted, at which point the buffer may be recycled.
+ // out-params. This call will be followed by either OnReadCompleted (on
+ // successful read or EOF) or OnResponseCompleted (on error). If
+ // OnReadCompleted is called, the buffer may be recycled. Otherwise, it may
+ // not be recycled and may potentially outlive the handler. If |min_size| is
+ // not -1, it is the minimum size of the returned buffer.
//
// If the handler returns false, then the request is cancelled. Otherwise,
// once data is available, OnReadCompleted will be called.