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 // 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // |uniquifier| is a number used to make unique names for the file. It is | 138 // |uniquifier| is a number used to make unique names for the file. It is |
139 // only valid for the DANGEROUS_BUT_VALIDATED state of the download item. | 139 // only valid for the DANGEROUS_BUT_VALIDATED state of the download item. |
140 virtual void OnDownloadRenamedToFinalName(int download_id, | 140 virtual void OnDownloadRenamedToFinalName(int download_id, |
141 const FilePath& full_path, | 141 const FilePath& full_path, |
142 int uniquifier) = 0; | 142 int uniquifier) = 0; |
143 | 143 |
144 // Remove downloads after remove_begin (inclusive) and before remove_end | 144 // Remove downloads after remove_begin (inclusive) and before remove_end |
145 // (exclusive). You may pass in null Time values to do an unbounded delete | 145 // (exclusive). You may pass in null Time values to do an unbounded delete |
146 // in either direction. | 146 // in either direction. |
147 virtual int RemoveDownloadsBetween(const base::Time remove_begin, | 147 virtual int RemoveDownloadsBetween(const base::Time remove_begin, |
148 const base::Time remove_end) = 0; | 148 const base::Time remove_end) = 0; |
149 | 149 |
150 // Remove downloads will delete all downloads that have a timestamp that is | 150 // Remove downloads will delete all downloads that have a timestamp that is |
151 // the same or more recent than |remove_begin|. The number of downloads | 151 // the same or more recent than |remove_begin|. The number of downloads |
152 // deleted is returned back to the caller. | 152 // deleted is returned back to the caller. |
153 virtual int RemoveDownloads(const base::Time remove_begin) = 0; | 153 virtual int RemoveDownloads(const base::Time remove_begin) = 0; |
154 | 154 |
155 // Remove all downloads will delete all downloads. The number of downloads | 155 // Remove all downloads will delete all downloads. The number of downloads |
156 // deleted is returned back to the caller. | 156 // deleted is returned back to the caller. |
157 virtual int RemoveAllDownloads() = 0; | 157 virtual int RemoveAllDownloads() = 0; |
158 | 158 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 friend class base::RefCountedThreadSafe< | 264 friend class base::RefCountedThreadSafe< |
265 DownloadManager, content::BrowserThread::DeleteOnUIThread>; | 265 DownloadManager, content::BrowserThread::DeleteOnUIThread>; |
266 friend struct content::BrowserThread::DeleteOnThread< | 266 friend struct content::BrowserThread::DeleteOnThread< |
267 content::BrowserThread::UI>; | 267 content::BrowserThread::UI>; |
268 friend class base::DeleteHelper<DownloadManager>; | 268 friend class base::DeleteHelper<DownloadManager>; |
269 }; | 269 }; |
270 | 270 |
271 } // namespace content | 271 } // namespace content |
272 | 272 |
273 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 273 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |