| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 virtual void SetTotalBytes(int64_t total_bytes); | 216 virtual void SetTotalBytes(int64_t total_bytes); |
| 217 | 217 |
| 218 virtual void OnAllDataSaved(int64_t total_bytes, | 218 virtual void OnAllDataSaved(int64_t total_bytes, |
| 219 std::unique_ptr<crypto::SecureHash> hash_state); | 219 std::unique_ptr<crypto::SecureHash> hash_state); |
| 220 | 220 |
| 221 // Called by SavePackage to display progress when the DownloadItem | 221 // Called by SavePackage to display progress when the DownloadItem |
| 222 // should be considered complete. | 222 // should be considered complete. |
| 223 virtual void MarkAsComplete(); | 223 virtual void MarkAsComplete(); |
| 224 | 224 |
| 225 // DownloadDestinationObserver | 225 // DownloadDestinationObserver |
| 226 void DestinationUpdate(int64_t bytes_so_far, int64_t bytes_per_sec) override; | 226 void DestinationUpdate( |
| 227 int64_t bytes_so_far, |
| 228 int64_t bytes_per_sec, |
| 229 const std::vector<DownloadItem::ReceivedSlice>& received_slices) override; |
| 227 void DestinationError( | 230 void DestinationError( |
| 228 DownloadInterruptReason reason, | 231 DownloadInterruptReason reason, |
| 229 int64_t bytes_so_far, | 232 int64_t bytes_so_far, |
| 230 std::unique_ptr<crypto::SecureHash> hash_state) override; | 233 std::unique_ptr<crypto::SecureHash> hash_state) override; |
| 231 void DestinationCompleted( | 234 void DestinationCompleted( |
| 232 int64_t total_bytes, | 235 int64_t total_bytes, |
| 233 std::unique_ptr<crypto::SecureHash> hash_state) override; | 236 std::unique_ptr<crypto::SecureHash> hash_state) override; |
| 234 | 237 |
| 235 private: | 238 private: |
| 236 friend class DownloadJob; | 239 friend class DownloadJob; |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 std::unique_ptr<DownloadJob> job_; | 689 std::unique_ptr<DownloadJob> job_; |
| 687 | 690 |
| 688 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 691 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 689 | 692 |
| 690 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 693 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 691 }; | 694 }; |
| 692 | 695 |
| 693 } // namespace content | 696 } // namespace content |
| 694 | 697 |
| 695 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 698 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |