| 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_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 7 | 7 |
| 8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // Set to true when multiple byte streams write to the same file. | 216 // Set to true when multiple byte streams write to the same file. |
| 217 // The file may contain null bytes(holes) in between of valid data slices. | 217 // The file may contain null bytes(holes) in between of valid data slices. |
| 218 // TODO(xingliu): Pass a slice info vector to determine if the file is sparse. | 218 // TODO(xingliu): Pass a slice info vector to determine if the file is sparse. |
| 219 bool is_sparse_file_; | 219 bool is_sparse_file_; |
| 220 | 220 |
| 221 // Statistics | 221 // Statistics |
| 222 size_t bytes_seen_; | 222 size_t bytes_seen_; |
| 223 base::TimeDelta disk_writes_time_; | 223 base::TimeDelta disk_writes_time_; |
| 224 base::TimeTicks download_start_; | 224 base::TimeTicks download_start_; |
| 225 RateEstimator rate_estimator_; | 225 RateEstimator rate_estimator_; |
| 226 int num_active_streams_; |
| 227 size_t bytes_seen_with_parallel_streams_; |
| 228 size_t bytes_seen_without_parallel_streams_; |
| 229 base::TimeDelta disk_writes_time_with_parallel_streams_; |
| 230 base::TimeDelta disk_writes_time_without_parallel_streams_; |
| 226 | 231 |
| 227 std::vector<DownloadItem::ReceivedSlice> received_slices_; | 232 std::vector<DownloadItem::ReceivedSlice> received_slices_; |
| 228 | 233 |
| 229 base::WeakPtr<DownloadDestinationObserver> observer_; | 234 base::WeakPtr<DownloadDestinationObserver> observer_; |
| 230 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; | 235 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |
| 231 | 236 |
| 232 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 237 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 233 }; | 238 }; |
| 234 | 239 |
| 235 } // namespace content | 240 } // namespace content |
| 236 | 241 |
| 237 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 242 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |