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

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

Issue 1004373002: Add last_requested field to the favicon_bitmaps table of the favicons database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge GetFaviconBitmapLastRequestedtime into GetFaviconBitmap. Created 5 years, 9 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 16a5bd1dade2f59d0aac3c2da7768fe0ef521ddb..c3c2927b86a760146cee2efbd81e1bac9e170759 100644
--- a/components/history/core/browser/thumbnail_database.h
+++ b/components/history/core/browser/thumbnail_database.h
@@ -82,6 +82,7 @@ class ThumbnailDatabase {
// bitmap at |bitmap_id|. Returns true if successful.
bool GetFaviconBitmap(FaviconBitmapID bitmap_id,
base::Time* last_updated,
+ base::Time* last_requested,
scoped_refptr<base::RefCountedMemory>* png_icon_data,
gfx::Size* pixel_size);
@@ -111,6 +112,11 @@ 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);
@@ -241,6 +247,7 @@ class ThumbnailDatabase {
FRIEND_TEST_ALL_PREFIXES(ThumbnailDatabaseTest, Version5);
FRIEND_TEST_ALL_PREFIXES(ThumbnailDatabaseTest, Version6);
FRIEND_TEST_ALL_PREFIXES(ThumbnailDatabaseTest, Version7);
+ FRIEND_TEST_ALL_PREFIXES(ThumbnailDatabaseTest, Version8);
FRIEND_TEST_ALL_PREFIXES(ThumbnailDatabaseTest, WildSchema);
// Open database on a given filename. If the file does not exist,
@@ -264,6 +271,9 @@ class ThumbnailDatabase {
// Removes sizes column.
bool UpgradeToVersion7();
+ // Adds support for bitmap usage tracking.
+ bool UpgradeToVersion8();
+
// Returns true if the |favicons| database is missing a column.
bool IsFaviconDBStructureIncorrect();
« no previous file with comments | « components/history/core/browser/history_types.h ('k') | components/history/core/browser/thumbnail_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698