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

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

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: Fix tests Created 3 years, 10 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 32963bfd476415a5b22a75857900d68b462c7527..44d773df88d255b82bc04ce377aa811e4fe029ef 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -377,6 +377,10 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// Returns true if the download has been opened.
virtual bool GetOpened() const = 0;
+ // Time the download was last accessed. Returns NULL if the download has never
+ // been opened.
+ virtual base::Time GetLastAccessTime() const = 0;
+
// Misc State accessors ---------------------------------------------------
// BrowserContext that indirectly owns this download. Always valid.
@@ -403,6 +407,9 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// Mark the download as having been opened (without actually opening it).
virtual void SetOpened(bool opened) = 0;
+ // Updates the last access time of the download.
+ virtual void UpdateLastAccessTime() = 0;
David Trainor- moved to gerrit 2017/02/22 05:56:03 Should this just be SetLastAccessTime(Time)? That
shaktisahu 2017/02/23 06:55:50 Good idea. Done.
+
// Set a display name for the download that will be independent of the target
// filename. If |name| is not empty, then GetFileNameToReportUser() will
// return |name|. Has no effect on the final target filename.

Powered by Google App Engine
This is Rietveld 408576698