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

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

Issue 2903573002: [Thumbnails DB] Add functionality to clear unused on-demand favicons. (Closed)
Patch Set: Peter's comments #4 Created 3 years, 5 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..0a9ea8e725a2dff06a32357f311f33ddac543ed2 100644
--- a/components/history/core/browser/thumbnail_database.h
+++ b/components/history/core/browser/thumbnail_database.h
@@ -66,6 +66,11 @@ class ThumbnailDatabase {
// true try to trim all unused cache, otherwise trim by half.
void TrimMemory(bool aggressively);
+ // Get all on-demand favicon bitmaps that have been last requested prior to
+ // |threshold|.
+ std::map<favicon_base::FaviconID, IconMappingsForExpiry>
+ GetOldOnDemandFavicons(base::Time threshold);
+
// Favicon Bitmaps -----------------------------------------------------------
// Returns true if there are favicon bitmaps for |icon_id|. If
@@ -200,6 +205,10 @@ class ThumbnailDatabase {
// Returns true if the deletion succeeded.
bool DeleteIconMappings(const GURL& page_url);
+ // Deletes the icon mapping entries for the given favicon.
pkotwicz 2017/07/10 19:50:19 Nit: "given favicon" -> "given favicon ID"
jkrcal 2017/07/11 13:19:35 Done.
+ // Returns true if the deletion succeeded.
+ bool DeleteIconMappingsForFaviconId(favicon_base::FaviconID id);
+
// Deletes the icon mapping with |mapping_id|.
// Returns true if the deletion succeeded.
bool DeleteIconMapping(IconMappingID mapping_id);

Powered by Google App Engine
This is Rietveld 408576698