summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/async_resource_handler.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 17:14:27 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 17:14:27 +0000
commit98c45033eb243d49211df0697fd7b2a699621c24 (patch)
tree618255ecfa151a1bcea23e645b759eff54cb29eb /chrome/browser/renderer_host/async_resource_handler.h
parentb36eabf380e2818b8b181f8af4bb4a89aeabe59b (diff)
downloadchromium_src-98c45033eb243d49211df0697fd7b2a699621c24.zip
chromium_src-98c45033eb243d49211df0697fd7b2a699621c24.tar.gz
chromium_src-98c45033eb243d49211df0697fd7b2a699621c24.tar.bz2
Only double the buffer when AsyncResourceHandler's caller fill the buffer.
This is an update to r29904 and came out of a discussion with Darin. BUG=http://crbug.com/24493 TEST=NONE Review URL: http://codereview.chromium.org/335010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/async_resource_handler.h')
-rw-r--r--chrome/browser/renderer_host/async_resource_handler.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/async_resource_handler.h b/chrome/browser/renderer_host/async_resource_handler.h
index b946d4d..b99ba10 100644
--- a/chrome/browser/renderer_host/async_resource_handler.h
+++ b/chrome/browser/renderer_host/async_resource_handler.h
@@ -46,10 +46,11 @@ class AsyncResourceHandler : public ResourceHandler {
base::ProcessHandle process_handle_;
ResourceDispatcherHost* rdh_;
- // We exponentially grow the size of the buffer allocated. On the first
- // OnWillRead() call, we allocate a buffer of 32k and double it on each
- // subsequent call, up to a maximum size of 512k. |next_buffer_size_| is the
- // size of the buffer to be allocated on the next OnWillRead() call.
+ // |next_buffer_size_| is the size of the buffer to be allocated on the next
+ // OnWillRead() call. We exponentially grow the size of the buffer allocated
+ // when our owner fills our buffers. On the first OnWillRead() call, we
+ // allocate a buffer of 32k and double it in OnReadCompleted() if the buffer
+ // was filled, up to a maximum size of 512k.
int next_buffer_size_;
DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler);