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

Unified Diff: content/public/browser/download_item.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
Index: content/public/browser/download_item.h
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index d3a7798a019b6f6976de26e6d3cdaaaaebc9e344..31b03527ad349723cf3281b87aa59a25cfbc7d35 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -154,7 +154,18 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// State accessors -----------------------------------------------------------
+ // Retrieve the ID for this download. The ID is provided by the owner of the
+ // DownloadItem and is expected to uniquely identify the download within the
+ // context of its container during the lifetime of the download.
virtual uint32_t GetId() const = 0;
+
+ // Retrieve the GUID for this download. The returned string is never empty and
+ // will satisfy base::IsValidGUID(), in addition to uniquely identifying the
+ // download during its lifetime regardless of its container.
+ virtual const std::string& GetGuid() const = 0;
+
+ // Get the current state of the download. See DownloadState for descriptions
+ // of each download state.
virtual DownloadState GetState() const = 0;
// Returns the most recent interrupt reason for this download. Returns
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698