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

Unified Diff: components/history/core/browser/history_backend.cc

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Filter out bookmarks Created 3 years, 7 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: components/history/core/browser/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index e2c03ac5bb7d6d334b51a9d74453c8ca6562b505..8135bd46798465f3010e29470074274b47d5ebda 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -1509,10 +1509,9 @@ void HistoryBackend::GetLargestFaviconForURL(
favicon_base::FaviconRawBitmapResult bitmap_result;
bitmap_result.icon_url = icon_url;
bitmap_result.icon_type = icon_type;
- if (!thumbnail_db_->GetFaviconBitmap(largest_icon.bitmap_id,
- &last_updated, nullptr,
- &bitmap_result.bitmap_data,
- &bitmap_result.pixel_size)) {
+ if (!thumbnail_db_->GetFaviconBitmap(
+ largest_icon.bitmap_id, /*access_time=*/Time::Now(), &last_updated,
+ &bitmap_result.bitmap_data, &bitmap_result.pixel_size)) {
return;
}
@@ -1968,8 +1967,8 @@ bool HistoryBackend::IsFaviconBitmapDataEqual(
return false;
scoped_refptr<base::RefCountedMemory> original_bitmap_data;
- thumbnail_db_->GetFaviconBitmap(bitmap_id, nullptr, nullptr,
- &original_bitmap_data, nullptr);
+ thumbnail_db_->GetFaviconBitmap(bitmap_id, /*access_time=*/Time::Now(),
+ nullptr, &original_bitmap_data, nullptr);
return new_bitmap_data->Equals(original_bitmap_data);
}
@@ -2057,9 +2056,9 @@ bool HistoryBackend::GetFaviconBitmapResultsForBestMatch(
favicon_base::FaviconRawBitmapResult bitmap_result;
bitmap_result.icon_url = icon_url;
bitmap_result.icon_type = icon_type;
- if (!thumbnail_db_->GetFaviconBitmap(best_bitmap_ids[i], &last_updated,
- nullptr, &bitmap_result.bitmap_data,
- &bitmap_result.pixel_size)) {
+ if (!thumbnail_db_->GetFaviconBitmap(
+ best_bitmap_ids[i], /*access_time=*/Time::Now(), &last_updated,
+ &bitmap_result.bitmap_data, &bitmap_result.pixel_size)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698