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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // deleted is returned back to the caller. | 146 // deleted is returned back to the caller. |
147 int RemoveDownloads(const base::Time remove_begin); | 147 int RemoveDownloads(const base::Time remove_begin); |
148 | 148 |
149 // Remove all downloads will delete all downloads. The number of downloads | 149 // Remove all downloads will delete all downloads. The number of downloads |
150 // deleted is returned back to the caller. | 150 // deleted is returned back to the caller. |
151 int RemoveAllDownloads(); | 151 int RemoveAllDownloads(); |
152 | 152 |
153 // Remove the download with id |download_id| from |active_downloads_|. | 153 // Remove the download with id |download_id| from |active_downloads_|. |
154 void RemoveFromActiveList(int32 download_id); | 154 void RemoveFromActiveList(int32 download_id); |
155 | 155 |
| 156 // Add DownloadItem to history, validate |db_handle| and store |
| 157 // it in the DownloadItem. |
| 158 void AddDownloadItemToHistory(DownloadItem* item, int64 db_handle); |
| 159 |
156 // Called when a Save Page As download is started. Transfers ownership | 160 // Called when a Save Page As download is started. Transfers ownership |
157 // of |download_item| to the DownloadManager. | 161 // of |download_item| to the DownloadManager. |
158 void SavePageAsDownloadStarted(DownloadItem* download_item); | 162 void SavePageAsDownloadStarted(DownloadItem* download_item); |
159 | 163 |
160 // Download the object at the URL. Used in cases such as "Save Link As..." | 164 // Download the object at the URL. Used in cases such as "Save Link As..." |
161 void DownloadUrl(const GURL& url, | 165 void DownloadUrl(const GURL& url, |
162 const GURL& referrer, | 166 const GURL& referrer, |
163 const std::string& referrer_encoding, | 167 const std::string& referrer_encoding, |
164 TabContents* tab_contents); | 168 TabContents* tab_contents); |
165 | 169 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // The "Save As" dialog box used to ask the user where a file should be | 387 // The "Save As" dialog box used to ask the user where a file should be |
384 // saved. | 388 // saved. |
385 scoped_refptr<SelectFileDialog> select_file_dialog_; | 389 scoped_refptr<SelectFileDialog> select_file_dialog_; |
386 | 390 |
387 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; | 391 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; |
388 | 392 |
389 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 393 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
390 }; | 394 }; |
391 | 395 |
392 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 396 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
OLD | NEW |