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

Unified Diff: chrome/browser/ntp_snippets/download_suggestions_provider.cc

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
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ntp_snippets/download_suggestions_provider.cc
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider.cc b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
index cdacc826ad3cc6d78d6413775978c93ade8e37a6..9a3fe2812e551d99831b16cd6badd79ac8a38cce 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -513,13 +513,11 @@ void DownloadSuggestionsProvider::FetchAssetsDownloads() {
for (DownloadItem* item : all_downloads) {
std::string within_category_id =
GetAssetDownloadPerCategoryID(item->GetId());
- // TODO(vitaliii): Provide proper last access time here once it is collected
- // for asset downloads.
if (old_dismissed_ids.count(within_category_id)) {
retained_dismissed_ids.insert(within_category_id);
} else if (IsAssetDownloadCompleted(*item) &&
!IsDownloadOutdated(GetAssetDownloadPublishedTime(*item),
- base::Time())) {
+ item->GetLastAccessTime())) {
cached_asset_downloads_.push_back(item);
// We may already observe this item and, therefore, we remove the
// observer first.
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698