Index: content/browser/renderer_host/redirect_to_file_resource_handler.h |
diff --git a/content/browser/renderer_host/redirect_to_file_resource_handler.h b/content/browser/renderer_host/redirect_to_file_resource_handler.h |
index 17b27383699ee2f7a269fb78a80f5e9c56874061..b33b212cb24686fc43fbb9d11306ed70149dd50a 100644 |
--- a/content/browser/renderer_host/redirect_to_file_resource_handler.h |
+++ b/content/browser/renderer_host/redirect_to_file_resource_handler.h |
@@ -82,6 +82,13 @@ class RedirectToFileResourceHandler : public LayeredResourceHandler { |
scoped_ptr<net::FileStream> file_stream_; |
bool write_callback_pending_; |
+ // |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_; |
+ |
// We create a ShareableFileReference that's deletable for the temp |
// file created as a result of the download. |
scoped_refptr<webkit_blob::ShareableFileReference> deletable_file_; |