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

Unified Diff: content/public/test/fake_download_item.h

Issue 2787303002: [NTP::Downloads] Use last access time to filter old asset downloads. (Closed)
Patch Set: clean rebase. Created 3 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/test/fake_download_item.h
diff --git a/content/public/test/fake_download_item.h b/content/public/test/fake_download_item.h
index 6ce9e71fa156374949588b12776fc67389b64420..b71ac93d0197aff93ab375d77d0c25b53bb358cc 100644
--- a/content/public/test/fake_download_item.h
+++ b/content/public/test/fake_download_item.h
@@ -72,6 +72,9 @@ class FakeDownloadItem : public DownloadItem {
void SetReceivedBytes(int64_t received_bytes);
int64_t GetReceivedBytes() const override;
+ void SetLastAccessTime(base::Time time) override;
+ base::Time GetLastAccessTime() const override;
+
// The methods below are not supported and are not expected to be called.
void ValidateDangerousDownload() override;
void StealDangerousDownload(bool delete_file_afterward,
@@ -121,14 +124,12 @@ class FakeDownloadItem : public DownloadItem {
bool GetOpenWhenComplete() const override;
bool GetAutoOpened() override;
bool GetOpened() const override;
- base::Time GetLastAccessTime() const override;
bool IsTransient() 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(base::Time time) override;
void SetDisplayName(const base::FilePath& name) override;
std::string DebugString(bool verbose) const override;
@@ -141,6 +142,7 @@ class FakeDownloadItem : public DownloadItem {
bool is_file_externally_removed_ = false;
base::Time start_time_;
base::Time end_time_;
+ base::Time last_access_time_;
// MAX_DOWNLOAD_STATE is used as the uninitialized state.
DownloadState download_state_ =
DownloadItem::DownloadState::MAX_DOWNLOAD_STATE;
« no previous file with comments | « chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc ('k') | content/public/test/fake_download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698