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

Unified Diff: components/history/core/browser/history_types.h

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Peter's comments #2 Created 3 years, 6 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_types.h
diff --git a/components/history/core/browser/history_types.h b/components/history/core/browser/history_types.h
index 9189b068c5a15a32913cde65ed493b4261b6a0ce..36a21380d5e0a79e8b257a6c15729bedc67d5601 100644
--- a/components/history/core/browser/history_types.h
+++ b/components/history/core/browser/history_types.h
@@ -526,6 +526,24 @@ struct FaviconBitmapIDSize {
gfx::Size pixel_size;
};
+enum FaviconBitmapType {
+ // The bitmap gets downloaded while visiting its page. Their life-time is
+ // bound to the life-time of the corresponding visit in history.
+ // - These bitmaps are re-downloaded when visiting the page again and the
+ // last_updated timestamp is old enough.
+ ON_VISIT,
+
+ // The bitmap gets downloaded because it is demanded by some Chrome UI (while
+ // not visiting its page). For this reason, their life-time cannot be bound to
+ // the life-time of the corresponding visit in history.
+ // - These bitmaps are evicted from the database based on the last time they
+ // were requested.
+ // - Furthermore, on-demand bitmaps are immediately marked as expired. Hence,
+ // they are always replaced by ON_VISIT favicons whenever their page gets
+ // visited.
+ ON_DEMAND
+};
+
// Defines a favicon bitmap stored in the history backend.
struct FaviconBitmap {
FaviconBitmap();

Powered by Google App Engine
This is Rietveld 408576698