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

Unified Diff: content/public/browser/download_manager.h

Issue 1781983002: [Downloads] Introduce GUIDs for downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_manager.h
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index b53151ac91dc10bbf8b3ea626b586346e0344329..565a425f081d0b34a85b4302e954188446d9b5ea 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -139,6 +139,7 @@ class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data {
// Called by the embedder, after creating the download manager, to let it know
// about downloads from previous runs of the browser.
virtual DownloadItem* CreateDownloadItem(
+ const std::string& guid,
uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
@@ -177,7 +178,13 @@ class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data {
// Get the download item for |id| if present, no matter what type of download
// it is or state it's in.
+ // DEPRECATED: Don't add new callers for GetDownload(uint32_t). Instead keep
+ // track of the GUID and use GetDownloadByGuid(), or observe the DownloadItem
+ // if you need to keep track of a specific download. (http://crbug.com/593020)
virtual DownloadItem* GetDownload(uint32_t id) = 0;
+
+ // Get the download item for |guid|.
+ virtual DownloadItem* GetDownloadByGuid(const std::string& guid) = 0;
};
} // namespace content
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698