Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: content/public/browser/download_manager.h

Issue 10912183: Remove DownloadManager::GetDownloadItem in favor of GetDownload() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // The number of in progress (including paused) downloads. 196 // The number of in progress (including paused) downloads.
197 virtual int InProgressCount() const = 0; 197 virtual int InProgressCount() const = 0;
198 198
199 virtual BrowserContext* GetBrowserContext() const = 0; 199 virtual BrowserContext* GetBrowserContext() const = 0;
200 200
201 // Checks whether downloaded files still exist. Updates state of downloads 201 // Checks whether downloaded files still exist. Updates state of downloads
202 // that refer to removed files. The check runs in the background and may 202 // that refer to removed files. The check runs in the background and may
203 // finish asynchronously after this method returns. 203 // finish asynchronously after this method returns.
204 virtual void CheckForHistoryFilesRemoval() = 0; 204 virtual void CheckForHistoryFilesRemoval() = 0;
205 205
206 // Get the download item from the history map. Useful after the item has
207 // been removed from the active map, or was retrieved from the history DB.
208 virtual DownloadItem* GetDownloadItem(int id) = 0;
209
210 // Get the download item for |id| if present, no matter what type of download 206 // Get the download item for |id| if present, no matter what type of download
211 // it is or state it's in. 207 // it is or state it's in.
212 virtual DownloadItem* GetDownload(int id) = 0; 208 virtual DownloadItem* GetDownload(int id) = 0;
213 209
214 // Called when Save Page download is done. 210 // Called when Save Page download is done.
215 virtual void SavePageDownloadFinished(DownloadItem* download) = 0; 211 virtual void SavePageDownloadFinished(DownloadItem* download) = 0;
216 212
217 // Get the download item from the active map. Useful when the item is not
218 // yet in the history map.
219 virtual DownloadItem* GetActiveDownloadItem(int id) = 0;
220
221 virtual bool GenerateFileHash() = 0; 213 virtual bool GenerateFileHash() = 0;
222 214
223 protected: 215 protected:
224 virtual ~DownloadManager() {} 216 virtual ~DownloadManager() {}
225 217
226 private: 218 private:
227 friend class base::RefCountedThreadSafe<DownloadManager>; 219 friend class base::RefCountedThreadSafe<DownloadManager>;
228 }; 220 };
229 221
230 } // namespace content 222 } // namespace content
231 223
232 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 224 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698