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

Unified Diff: content/browser/download/download_item_impl.h

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase + Java accessor 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/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index 47a0b0b6f4fcca54e58ef085d1765eff0828a548..7b953b24387786dc3ddea74fa517f38e6d97c0a6 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -75,6 +75,7 @@ class CONTENT_EXPORT DownloadItemImpl
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ const base::Time& last_access_time,
const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log);
@@ -162,11 +163,13 @@ class CONTENT_EXPORT DownloadItemImpl
bool GetOpenWhenComplete() const override;
bool GetAutoOpened() override;
bool GetOpened() const override;
+ base::Time GetLastAccessTime() const override;
BrowserContext* GetBrowserContext() const override;
WebContents* GetWebContents() const override;
void OnContentCheckCompleted(DownloadDangerType danger_type) override;
void SetOpenWhenComplete(bool open) override;
void SetOpened(bool opened) override;
+ void SetLastAccessTime(const base::Time& last_access_time) override;
void SetDisplayName(const base::FilePath& name) override;
std::string DebugString(bool verbose) const override;
@@ -621,6 +624,9 @@ class CONTENT_EXPORT DownloadItemImpl
// be treated as though the user opened it.
bool opened_ = false;
+ // Time when the download was last accessed.
+ base::Time last_access_time_;
+
// Did the delegate delay calling Complete on this download?
bool delegate_delayed_complete_ = false;

Powered by Google App Engine
This is Rietveld 408576698