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

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

Issue 2903573002: [Thumbnails DB] Add functionality to clear unused on-demand favicons. (Closed)
Patch Set: Implementation variants + unit-tests 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/thumbnail_database.h
diff --git a/components/history/core/browser/thumbnail_database.h b/components/history/core/browser/thumbnail_database.h
index 697faf3abec0a6d18d3dc8639ae869e732116ad8..78a9deec0a8c5906da87dec1a81c4d30275dc635 100644
--- a/components/history/core/browser/thumbnail_database.h
+++ b/components/history/core/browser/thumbnail_database.h
@@ -66,6 +66,15 @@ class ThumbnailDatabase {
// true try to trim all unused cache, otherwise trim by half.
void TrimMemory(bool aggressively);
+ // Delete all on-demand favicon bitmaps that have not been requested long
+ // (i.e. not after |deletion_threshold|). Do not delete bitmaps for URLs
+ // that are bookmarked in |bookmark_model|. Furthermore, delete all favicons
+ // with no corresponding bitmap and all mappings with no corresponding
+ // favicon.
+ void ClearOldOnDemandFavicons(base::Time deletion_threshold);
+ void ClearOldOnDemandFaviconsOneByOne(base::Time deletion_threshold);
+ void ClearOldOnDemandFaviconsNoJoin(base::Time deletion_threshold);
+
// Favicon Bitmaps -----------------------------------------------------------
// Returns true if there are favicon bitmaps for |icon_id|. If

Powered by Google App Engine
This is Rietveld 408576698