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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Remove downloads will delete all downloads that have a timestamp that is | 126 // Remove downloads will delete all downloads that have a timestamp that is |
127 // the same or more recent than |remove_begin|. The number of downloads | 127 // the same or more recent than |remove_begin|. The number of downloads |
128 // deleted is returned back to the caller. | 128 // deleted is returned back to the caller. |
129 int RemoveDownloads(const base::Time remove_begin); | 129 int RemoveDownloads(const base::Time remove_begin); |
130 | 130 |
131 // Remove all downloads will delete all downloads. The number of downloads | 131 // Remove all downloads will delete all downloads. The number of downloads |
132 // deleted is returned back to the caller. | 132 // deleted is returned back to the caller. |
133 int RemoveAllDownloads(); | 133 int RemoveAllDownloads(); |
134 | 134 |
135 // Called when a Save Page As download is started. | 135 // Called when a Save Page As download is started. Transfers ownership |
| 136 // of |download_item| to the DownloadManager. |
136 void SavePageAsDownloadStarted(DownloadItem* download_item); | 137 void SavePageAsDownloadStarted(DownloadItem* download_item); |
137 | 138 |
138 // Download the object at the URL. Used in cases such as "Save Link As..." | 139 // Download the object at the URL. Used in cases such as "Save Link As..." |
139 void DownloadUrl(const GURL& url, | 140 void DownloadUrl(const GURL& url, |
140 const GURL& referrer, | 141 const GURL& referrer, |
141 const std::string& referrer_encoding, | 142 const std::string& referrer_encoding, |
142 TabContents* tab_contents); | 143 TabContents* tab_contents); |
143 | 144 |
144 // Download the object at the URL and save it to the specified path. The | 145 // Download the object at the URL and save it to the specified path. The |
145 // download is treated as the temporary download and thus will not appear | 146 // download is treated as the temporary download and thus will not appear |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // The "Save As" dialog box used to ask the user where a file should be | 359 // The "Save As" dialog box used to ask the user where a file should be |
359 // saved. | 360 // saved. |
360 scoped_refptr<SelectFileDialog> select_file_dialog_; | 361 scoped_refptr<SelectFileDialog> select_file_dialog_; |
361 | 362 |
362 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; | 363 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; |
363 | 364 |
364 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 365 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
365 }; | 366 }; |
366 | 367 |
367 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 368 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
OLD | NEW |