| 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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
| 6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
| 7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
| 8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const base::Time& start_time, | 143 const base::Time& start_time, |
| 144 const base::Time& end_time, | 144 const base::Time& end_time, |
| 145 const std::string& etag, | 145 const std::string& etag, |
| 146 const std::string& last_modified, | 146 const std::string& last_modified, |
| 147 int64_t received_bytes, | 147 int64_t received_bytes, |
| 148 int64_t total_bytes, | 148 int64_t total_bytes, |
| 149 const std::string& hash, | 149 const std::string& hash, |
| 150 DownloadItem::DownloadState state, | 150 DownloadItem::DownloadState state, |
| 151 DownloadDangerType danger_type, | 151 DownloadDangerType danger_type, |
| 152 DownloadInterruptReason interrupt_reason, | 152 DownloadInterruptReason interrupt_reason, |
| 153 bool opened) = 0; | 153 bool opened, |
| 154 const std::vector<DownloadItem::ReceivedSlice>& received_slices) = 0; |
| 154 | 155 |
| 155 // The number of in progress (including paused) downloads. | 156 // The number of in progress (including paused) downloads. |
| 156 // Performance note: this loops over all items. If profiling finds that this | 157 // Performance note: this loops over all items. If profiling finds that this |
| 157 // is too slow, use an AllDownloadItemNotifier to count in-progress items. | 158 // is too slow, use an AllDownloadItemNotifier to count in-progress items. |
| 158 virtual int InProgressCount() const = 0; | 159 virtual int InProgressCount() const = 0; |
| 159 | 160 |
| 160 // The number of in progress (including paused) downloads. | 161 // The number of in progress (including paused) downloads. |
| 161 // Performance note: this loops over all items. If profiling finds that this | 162 // Performance note: this loops over all items. If profiling finds that this |
| 162 // is too slow, use an AllDownloadItemNotifier to count in-progress items. | 163 // is too slow, use an AllDownloadItemNotifier to count in-progress items. |
| 163 // This excludes downloads that are marked as malicious. | 164 // This excludes downloads that are marked as malicious. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 177 // if you need to keep track of a specific download. (http://crbug.com/593020) | 178 // if you need to keep track of a specific download. (http://crbug.com/593020) |
| 178 virtual DownloadItem* GetDownload(uint32_t id) = 0; | 179 virtual DownloadItem* GetDownload(uint32_t id) = 0; |
| 179 | 180 |
| 180 // Get the download item for |guid|. | 181 // Get the download item for |guid|. |
| 181 virtual DownloadItem* GetDownloadByGuid(const std::string& guid) = 0; | 182 virtual DownloadItem* GetDownloadByGuid(const std::string& guid) = 0; |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace content | 185 } // namespace content |
| 185 | 186 |
| 186 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 187 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |