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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 int64 received_bytes, | 149 int64 received_bytes, |
150 int64 total_bytes, | 150 int64 total_bytes, |
151 DownloadItem::DownloadState state, | 151 DownloadItem::DownloadState state, |
152 DownloadDangerType danger_type, | 152 DownloadDangerType danger_type, |
153 DownloadInterruptReason interrupt_reason, | 153 DownloadInterruptReason interrupt_reason, |
154 bool opened) = 0; | 154 bool opened) = 0; |
155 | 155 |
156 // The number of in progress (including paused) downloads. | 156 // The number of in progress (including paused) downloads. |
157 // 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 |
158 // is too slow, use an AllDownloadItemNotifier to count in-progress items. | 158 // is too slow, use an AllDownloadItemNotifier to count in-progress items. |
159 virtual int InProgressCount() const = 0; | 159 virtual int InProgressCount() const = 0; |
asanka
2013/10/11 16:02:35
Is InProgressCount() used anywhere? And if so, can
felt
2013/10/11 17:26:44
It's used in several browser tests, and I think th
| |
160 | 160 |
161 // The number of in progress (including paused) downloads. | |
162 // Performance note: this loops over all items. If profiling finds that this | |
163 // is too slow, use an AllDownloadItemNotifier to count in-progress items. | |
164 // This excludes downloads that are marked as any kind of dangerous. | |
165 virtual int NonDangerousInProgressCount() const = 0; | |
166 | |
161 virtual BrowserContext* GetBrowserContext() const = 0; | 167 virtual BrowserContext* GetBrowserContext() const = 0; |
162 | 168 |
163 // Checks whether downloaded files still exist. Updates state of downloads | 169 // Checks whether downloaded files still exist. Updates state of downloads |
164 // that refer to removed files. The check runs in the background and may | 170 // that refer to removed files. The check runs in the background and may |
165 // finish asynchronously after this method returns. | 171 // finish asynchronously after this method returns. |
166 virtual void CheckForHistoryFilesRemoval() = 0; | 172 virtual void CheckForHistoryFilesRemoval() = 0; |
167 | 173 |
168 // Get the download item for |id| if present, no matter what type of download | 174 // Get the download item for |id| if present, no matter what type of download |
169 // it is or state it's in. | 175 // it is or state it's in. |
170 virtual DownloadItem* GetDownload(uint32 id) = 0; | 176 virtual DownloadItem* GetDownload(uint32 id) = 0; |
171 }; | 177 }; |
172 | 178 |
173 } // namespace content | 179 } // namespace content |
174 | 180 |
175 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 181 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |