Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 profile in Chrome. | 8 // active profile in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 // Notifications sent from the download thread to the UI thread | 118 // Notifications sent from the download thread to the UI thread |
| 119 void StartDownload(DownloadCreateInfo* info); | 119 void StartDownload(DownloadCreateInfo* info); |
| 120 void UpdateDownload(int32 download_id, int64 size); | 120 void UpdateDownload(int32 download_id, int64 size); |
| 121 void OnAllDataSaved(int32 download_id, int64 size); | 121 void OnAllDataSaved(int32 download_id, int64 size); |
| 122 | 122 |
| 123 // Called from a view when a user clicks a UI button or link. | 123 // Called from a view when a user clicks a UI button or link. |
| 124 void DownloadCancelled(int32 download_id); | 124 void DownloadCancelled(int32 download_id); |
| 125 void PauseDownload(int32 download_id, bool pause); | 125 void PauseDownload(int32 download_id, bool pause); |
| 126 void RemoveDownload(int64 download_handle); | 126 void RemoveDownload(int64 download_handle); |
| 127 | 127 |
| 128 // Complete the non-racing portion of the download after | |
| 129 // all UI initialization had occurred and all data has | |
| 130 // arrived. Called from locations where it is possible | |
| 131 // those conditions may apply. | |
| 132 void MaybeCompleteDownload(int32 download_id, int64 size); | |
|
Paweł Hajdan Jr.
2011/01/03 09:43:03
Can we find a more descriptive name, i.e. one that
Randy Smith (Not in Mondays)
2011/01/04 19:29:21
Hmmm. My call would be that MaybeCompleteDownload
| |
| 133 | |
| 128 // Called when the download is renamed to its final name. | 134 // Called when the download is renamed to its final name. |
| 129 void DownloadRenamedToFinalName(int download_id, const FilePath& full_path); | 135 void DownloadRenamedToFinalName(int download_id, const FilePath& full_path); |
| 130 | 136 |
| 131 // Remove downloads after remove_begin (inclusive) and before remove_end | 137 // Remove downloads after remove_begin (inclusive) and before remove_end |
| 132 // (exclusive). You may pass in null Time values to do an unbounded delete | 138 // (exclusive). You may pass in null Time values to do an unbounded delete |
| 133 // in either direction. | 139 // in either direction. |
| 134 int RemoveDownloadsBetween(const base::Time remove_begin, | 140 int RemoveDownloadsBetween(const base::Time remove_begin, |
| 135 const base::Time remove_end); | 141 const base::Time remove_end); |
| 136 | 142 |
| 137 // Remove downloads will delete all downloads that have a timestamp that is | 143 // Remove downloads will delete all downloads that have a timestamp that is |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 // The "Save As" dialog box used to ask the user where a file should be | 377 // The "Save As" dialog box used to ask the user where a file should be |
| 372 // saved. | 378 // saved. |
| 373 scoped_refptr<SelectFileDialog> select_file_dialog_; | 379 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 374 | 380 |
| 375 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; | 381 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; |
| 376 | 382 |
| 377 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 383 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 378 }; | 384 }; |
| 379 | 385 |
| 380 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 386 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |