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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 scoped_ptr<ByteStreamWriter> stream_writer_; // To rest of system. | 119 scoped_ptr<ByteStreamWriter> stream_writer_; // To rest of system. |
120 | 120 |
121 // The following are used to collect stats. | 121 // The following are used to collect stats. |
122 base::TimeTicks download_start_time_; | 122 base::TimeTicks download_start_time_; |
123 base::TimeTicks last_read_time_; | 123 base::TimeTicks last_read_time_; |
124 base::TimeTicks last_stream_pause_time_; | 124 base::TimeTicks last_stream_pause_time_; |
125 base::TimeDelta total_pause_time_; | 125 base::TimeDelta total_pause_time_; |
126 size_t last_buffer_size_; | 126 size_t last_buffer_size_; |
127 int64 bytes_read_; | 127 int64 bytes_read_; |
128 std::string accept_ranges_; | 128 std::string accept_ranges_; |
| 129 std::string etag_; |
129 | 130 |
130 int pause_count_; | 131 int pause_count_; |
131 bool was_deferred_; | 132 bool was_deferred_; |
132 | 133 |
133 // For DCHECKing | 134 // For DCHECKing |
134 bool on_response_started_called_; | 135 bool on_response_started_called_; |
135 | 136 |
136 static const int kReadBufSize = 32768; // bytes | 137 static const int kReadBufSize = 32768; // bytes |
137 static const int kThrottleTimeMs = 200; // milliseconds | 138 static const int kThrottleTimeMs = 200; // milliseconds |
138 | 139 |
139 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 140 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
140 }; | 141 }; |
141 | 142 |
142 } // namespace content | 143 } // namespace content |
143 | 144 |
144 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 145 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
OLD | NEW |