OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // The following are used to collect stats. | 131 // The following are used to collect stats. |
132 base::TimeTicks download_start_time_; | 132 base::TimeTicks download_start_time_; |
133 base::TimeTicks last_read_time_; | 133 base::TimeTicks last_read_time_; |
134 size_t last_buffer_size_; | 134 size_t last_buffer_size_; |
135 int64 bytes_read_; | 135 int64 bytes_read_; |
136 std::string accept_ranges_; | 136 std::string accept_ranges_; |
137 | 137 |
138 int pause_count_; | 138 int pause_count_; |
139 bool was_deferred_; | 139 bool was_deferred_; |
140 | 140 |
| 141 // For DCHECKing |
| 142 bool on_response_started_called_; |
| 143 |
141 static const int kReadBufSize = 32768; // bytes | 144 static const int kReadBufSize = 32768; // bytes |
142 static const int kThrottleTimeMs = 200; // milliseconds | 145 static const int kThrottleTimeMs = 200; // milliseconds |
143 | 146 |
144 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 147 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
145 }; | 148 }; |
146 | 149 |
147 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 150 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
OLD | NEW |