| 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_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 705 |
| 706 // Error return from DestinationError or received at Start(). Stored | 706 // Error return from DestinationError or received at Start(). Stored |
| 707 // separately from last_reason_ so that we can avoid handling destination | 707 // separately from last_reason_ so that we can avoid handling destination |
| 708 // errors until after file name determination has occurred. | 708 // errors until after file name determination has occurred. |
| 709 DownloadInterruptReason deferred_interrupt_reason_ = | 709 DownloadInterruptReason deferred_interrupt_reason_ = |
| 710 DOWNLOAD_INTERRUPT_REASON_NONE; | 710 DOWNLOAD_INTERRUPT_REASON_NONE; |
| 711 | 711 |
| 712 // The following fields describe the current state of the download file. | 712 // The following fields describe the current state of the download file. |
| 713 | 713 |
| 714 // DownloadFile associated with this download. Note that this | 714 // DownloadFile associated with this download. Note that this |
| 715 // pointer may only be used or destroyed on the FILE thread. | 715 // pointer may only be used or destroyed on the download sequence. |
| 716 // This pointer will be non-null only while the DownloadItem is in | 716 // This pointer will be non-null only while the DownloadItem is in |
| 717 // the IN_PROGRESS state. | 717 // the IN_PROGRESS state. |
| 718 std::unique_ptr<DownloadFile> download_file_; | 718 std::unique_ptr<DownloadFile> download_file_; |
| 719 | 719 |
| 720 // Information about |download_file_|. | 720 // Information about |download_file_|. |
| 721 DestinationInfo destination_info_; | 721 DestinationInfo destination_info_; |
| 722 | 722 |
| 723 // Current speed. Calculated by the DownloadFile. | 723 // Current speed. Calculated by the DownloadFile. |
| 724 int64_t bytes_per_sec_ = 0; | 724 int64_t bytes_per_sec_ = 0; |
| 725 | 725 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 751 int64_t received_bytes_at_length_mismatch_ = -1; | 751 int64_t received_bytes_at_length_mismatch_ = -1; |
| 752 | 752 |
| 753 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 753 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 754 | 754 |
| 755 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 755 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 756 }; | 756 }; |
| 757 | 757 |
| 758 } // namespace content | 758 } // namespace content |
| 759 | 759 |
| 760 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 760 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |