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

Unified Diff: chrome/browser/renderer_host/async_resource_handler.h

Issue 335010: Only double the buffer when AsyncResourceHandler's caller fill the buffer. (Closed)
Patch Set: Created 11 years, 2 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 | « no previous file | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/async_resource_handler.h
diff --git a/chrome/browser/renderer_host/async_resource_handler.h b/chrome/browser/renderer_host/async_resource_handler.h
index b946d4d70a8b7dc5979961d6e1dc823fd7427d8b..b99ba1078795e27d5990da43a7a2c173a97d0d89 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);
« no previous file with comments | « no previous file | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698