| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 int routing_id, | 23 int routing_id, |
| 24 const GURL& url, | 24 const GURL& url, |
| 25 ResourceDispatcherHost* resource_dispatcher_host); | 25 ResourceDispatcherHost* resource_dispatcher_host); |
| 26 | 26 |
| 27 // ResourceHandler implementation: | 27 // ResourceHandler implementation: |
| 28 virtual bool OnUploadProgress(int request_id, | 28 virtual bool OnUploadProgress(int request_id, |
| 29 uint64 position, | 29 uint64 position, |
| 30 uint64 size) OVERRIDE; | 30 uint64 size) OVERRIDE; |
| 31 virtual bool OnRequestRedirected(int request_id, | 31 virtual bool OnRequestRedirected(int request_id, |
| 32 const GURL& new_url, | 32 const GURL& new_url, |
| 33 ResourceResponse* response, | 33 content::ResourceResponse* response, |
| 34 bool* defer) OVERRIDE; | 34 bool* defer) OVERRIDE; |
| 35 virtual bool OnResponseStarted(int request_id, | 35 virtual bool OnResponseStarted(int request_id, |
| 36 ResourceResponse* response) OVERRIDE; | 36 content::ResourceResponse* response) OVERRIDE; |
| 37 virtual bool OnWillStart(int request_id, | 37 virtual bool OnWillStart(int request_id, |
| 38 const GURL& url, | 38 const GURL& url, |
| 39 bool* defer) OVERRIDE; | 39 bool* defer) OVERRIDE; |
| 40 virtual bool OnWillRead(int request_id, | 40 virtual bool OnWillRead(int request_id, |
| 41 net::IOBuffer** buf, | 41 net::IOBuffer** buf, |
| 42 int* buf_size, | 42 int* buf_size, |
| 43 int min_size) OVERRIDE; | 43 int min_size) OVERRIDE; |
| 44 virtual bool OnReadCompleted(int request_id, | 44 virtual bool OnReadCompleted(int request_id, |
| 45 int* bytes_read) OVERRIDE; | 45 int* bytes_read) OVERRIDE; |
| 46 virtual bool OnResponseCompleted(int request_id, | 46 virtual bool OnResponseCompleted(int request_id, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 65 // OnWillRead() call. We exponentially grow the size of the buffer allocated | 65 // OnWillRead() call. We exponentially grow the size of the buffer allocated |
| 66 // when our owner fills our buffers. On the first OnWillRead() call, we | 66 // when our owner fills our buffers. On the first OnWillRead() call, we |
| 67 // allocate a buffer of 32k and double it in OnReadCompleted() if the buffer | 67 // allocate a buffer of 32k and double it in OnReadCompleted() if the buffer |
| 68 // was filled, up to a maximum size of 512k. | 68 // was filled, up to a maximum size of 512k. |
| 69 int next_buffer_size_; | 69 int next_buffer_size_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); | 71 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 #endif // CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ |
| OLD | NEW |