| 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 b277d0e6cf4bbff032a26f77ef68207f8e72a1e0..79d9a8d09038b30c8cf519a42b05edefaa147307 100644
|
| --- a/components/history/core/browser/thumbnail_database.h
|
| +++ b/components/history/core/browser/thumbnail_database.h
|
| @@ -62,6 +62,12 @@ class ThumbnailDatabase {
|
| // true try to trim all unused cache, otherwise trim by half.
|
| void TrimMemory(bool aggressively);
|
|
|
| + // Delete all favicon bitmaps that have not been requested long (i.e. not
|
| + // after |expiration_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 CleanUnusedFavicons(base::Time expiration_threshold);
|
| +
|
| // Favicon Bitmaps -----------------------------------------------------------
|
|
|
| // Returns true if there are favicon bitmaps for |icon_id|. If
|
| @@ -80,10 +86,14 @@ class ThumbnailDatabase {
|
| std::vector<FaviconBitmap>* favicon_bitmaps);
|
|
|
| // Gets the last updated time, bitmap data, and pixel size of the favicon
|
| - // bitmap at |bitmap_id|. Returns true if successful.
|
| + // bitmap at |bitmap_id|. Returns true if successful. The |access_time| is
|
| + // stored for |bitmap_id| (should be base::Time:Now() in most cases and
|
| + // base::Time() in incognito profiles to avoid storing the access). The access
|
| + // times are used to detect that a favicon should be removed if it has not
|
| + // been used for long.
|
| bool GetFaviconBitmap(FaviconBitmapID bitmap_id,
|
| + base::Time access_time,
|
| base::Time* last_updated,
|
| - base::Time* last_requested,
|
| scoped_refptr<base::RefCountedMemory>* png_icon_data,
|
| gfx::Size* pixel_size);
|
|
|
| @@ -113,11 +123,6 @@ class ThumbnailDatabase {
|
| bool SetFaviconBitmapLastUpdateTime(FaviconBitmapID bitmap_id,
|
| base::Time time);
|
|
|
| - // Sets the last requested time for the favicon bitmap at |bitmap_id|.
|
| - // Returns true if successful.
|
| - bool SetFaviconBitmapLastRequestedTime(FaviconBitmapID bitmap_id,
|
| - base::Time time);
|
| -
|
| // Deletes the favicon bitmap with |bitmap_id|.
|
| // Returns true if successful.
|
| bool DeleteFaviconBitmap(FaviconBitmapID bitmap_id);
|
|
|