OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/renderer_host/resource_handler.h" | 10 #include "chrome/browser/renderer_host/resource_handler.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 bool ShouldWaitForPlugins(); | 55 bool ShouldWaitForPlugins(); |
56 | 56 |
57 // A test to determining whether the request should be forwarded to the | 57 // A test to determining whether the request should be forwarded to the |
58 // download thread. If need_plugin_list was passed in and was set to true, | 58 // download thread. If need_plugin_list was passed in and was set to true, |
59 // that means that the check couldn't be fully done because the plugins aren't | 59 // that means that the check couldn't be fully done because the plugins aren't |
60 // loaded. The function should be called again after the plugin list is | 60 // loaded. The function should be called again after the plugin list is |
61 // loaded. | 61 // loaded. |
62 bool ShouldDownload(bool* need_plugin_list); | 62 bool ShouldDownload(bool* need_plugin_list); |
63 | 63 |
64 // Called on the file thread to load the list of plugins. | 64 // Called on the file thread to load the list of plugins. |
65 static void LoadPlugins(BufferedResourceHandler* handler); | 65 void LoadPlugins(); |
66 | 66 |
67 // Called on the IO thread once the list of plugins has been loaded. | 67 // Called on the IO thread once the list of plugins has been loaded. |
68 static void OnPluginsLoaded(BufferedResourceHandler* handler); | 68 void OnPluginsLoaded(); |
69 | 69 |
70 scoped_refptr<ResourceHandler> real_handler_; | 70 scoped_refptr<ResourceHandler> real_handler_; |
71 scoped_refptr<ResourceResponse> response_; | 71 scoped_refptr<ResourceResponse> response_; |
72 ResourceDispatcherHost* host_; | 72 ResourceDispatcherHost* host_; |
73 URLRequest* request_; | 73 URLRequest* request_; |
74 scoped_refptr<net::IOBuffer> read_buffer_; | 74 scoped_refptr<net::IOBuffer> read_buffer_; |
75 scoped_refptr<net::IOBuffer> my_buffer_; | 75 scoped_refptr<net::IOBuffer> my_buffer_; |
76 int read_buffer_size_; | 76 int read_buffer_size_; |
77 int bytes_read_; | 77 int bytes_read_; |
78 bool sniff_content_; | 78 bool sniff_content_; |
79 bool should_buffer_; | 79 bool should_buffer_; |
80 bool wait_for_plugins_; | 80 bool wait_for_plugins_; |
81 bool buffering_; | 81 bool buffering_; |
82 bool finished_; | 82 bool finished_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 84 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
85 }; | 85 }; |
86 | 86 |
87 #endif // CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 87 #endif // CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
OLD | NEW |