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 CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/timer.h" | 12 #include "base/timer.h" |
13 #include "chrome/browser/download/download_file.h" | 13 #include "content/browser/download/download_file.h" |
14 #include "content/browser/renderer_host/global_request_id.h" | 14 #include "content/browser/renderer_host/global_request_id.h" |
15 #include "content/browser/renderer_host/resource_handler.h" | 15 #include "content/browser/renderer_host/resource_handler.h" |
16 | 16 |
17 class DownloadFileManager; | 17 class DownloadFileManager; |
18 class ResourceDispatcherHost; | 18 class ResourceDispatcherHost; |
19 struct DownloadBuffer; | 19 struct DownloadBuffer; |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 class URLRequest; | 22 class URLRequest; |
23 } // namespace net | 23 } // namespace net |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 base::OneShotTimer<DownloadResourceHandler> pause_timer_; | 91 base::OneShotTimer<DownloadResourceHandler> pause_timer_; |
92 base::TimeTicks download_start_time_; // used to collect stats. | 92 base::TimeTicks download_start_time_; // used to collect stats. |
93 static const int kReadBufSize = 32768; // bytes | 93 static const int kReadBufSize = 32768; // bytes |
94 static const size_t kLoadsToWrite = 100; // number of data buffers queued | 94 static const size_t kLoadsToWrite = 100; // number of data buffers queued |
95 static const int kThrottleTimeMs = 200; // milliseconds | 95 static const int kThrottleTimeMs = 200; // milliseconds |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 97 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
98 }; | 98 }; |
99 | 99 |
100 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ | 100 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ |
OLD | NEW |