| 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_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/timer.h" | 13 #include "base/timer.h" |
| 14 #include "content/browser/download/download_file.h" | |
| 15 #include "content/browser/download/download_id.h" | 14 #include "content/browser/download/download_id.h" |
| 16 #include "content/browser/download/download_types.h" | 15 #include "content/browser/download/download_types.h" |
| 17 #include "content/browser/renderer_host/global_request_id.h" | 16 #include "content/browser/renderer_host/global_request_id.h" |
| 18 #include "content/browser/renderer_host/resource_handler.h" | 17 #include "content/browser/renderer_host/resource_handler.h" |
| 18 #include "net/base/net_errors.h" |
| 19 | 19 |
| 20 class DownloadFileManager; | 20 class DownloadFileManager; |
| 21 class ResourceDispatcherHost; | 21 class ResourceDispatcherHost; |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 class DownloadBuffer; | 24 class DownloadBuffer; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 class URLRequest; | 28 class URLRequest; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 base::TimeTicks download_start_time_; // used to collect stats. | 117 base::TimeTicks download_start_time_; // used to collect stats. |
| 118 base::TimeTicks last_read_time_; // used to collect stats. | 118 base::TimeTicks last_read_time_; // used to collect stats. |
| 119 size_t last_buffer_size_; // used to collect stats. | 119 size_t last_buffer_size_; // used to collect stats. |
| 120 static const int kReadBufSize = 32768; // bytes | 120 static const int kReadBufSize = 32768; // bytes |
| 121 static const int kThrottleTimeMs = 200; // milliseconds | 121 static const int kThrottleTimeMs = 200; // milliseconds |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 123 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 126 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| OLD | NEW |