OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 // to display progress when the DownloadItem should be considered complete. | 178 // to display progress when the DownloadItem should be considered complete. |
179 void MarkAsComplete(); | 179 void MarkAsComplete(); |
180 | 180 |
181 // Called when all data has been saved. Only has display effects. | 181 // Called when all data has been saved. Only has display effects. |
182 void OnAllDataSaved(int64 size); | 182 void OnAllDataSaved(int64 size); |
183 | 183 |
184 // Called when the downloaded file is removed. | 184 // Called when the downloaded file is removed. |
185 void OnDownloadedFileRemoved(); | 185 void OnDownloadedFileRemoved(); |
186 | 186 |
187 // Download operation had an error. | 187 // Download operation had an error. |
188 // |size| is the amount of data received so far, and |os_error| is the error | 188 // |size| is the amount of data received at interruption. |
189 // code that the operation received. | 189 // |error| is the error code that the operation received. |
Randy Smith (Not in Mondays)
2011/08/19 20:09:13
Shouldn't this comment specify the type/namespace
ahendrickson
2011/08/22 14:53:30
Done.
| |
190 void Interrupted(int64 size, int os_error); | 190 void Interrupted(int64 size, int error); |
191 | 191 |
192 // Deletes the file from disk and removes the download from the views and | 192 // Deletes the file from disk and removes the download from the views and |
193 // history. |user| should be true if this is the result of the user clicking | 193 // history. |user| should be true if this is the result of the user clicking |
194 // the discard button, and false if it is being deleted for other reasons like | 194 // the discard button, and false if it is being deleted for other reasons like |
195 // browser shutdown. | 195 // browser shutdown. |
196 void Delete(DeleteReason reason); | 196 void Delete(DeleteReason reason); |
197 | 197 |
198 // Removes the download from the views and history. | 198 // Removes the download from the views and history. |
199 void Remove(); | 199 void Remove(); |
200 | 200 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 // only. | 484 // only. |
485 bool open_enabled_; | 485 bool open_enabled_; |
486 | 486 |
487 // DownloadItem observes CRX installs it initiates. | 487 // DownloadItem observes CRX installs it initiates. |
488 NotificationRegistrar registrar_; | 488 NotificationRegistrar registrar_; |
489 | 489 |
490 DISALLOW_COPY_AND_ASSIGN(DownloadItem); | 490 DISALLOW_COPY_AND_ASSIGN(DownloadItem); |
491 }; | 491 }; |
492 | 492 |
493 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 493 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
OLD | NEW |