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

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: Initial CL for review. 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..cdbda66da6cf06b10bd234a99824cbca080d3227 100644
--- a/components/history/core/browser/thumbnail_database.h
+++ b/components/history/core/browser/thumbnail_database.h
@@ -85,6 +85,11 @@ class ThumbnailDatabase {
scoped_refptr<base::RefCountedMemory>* png_icon_data,
gfx::Size* pixel_size);
+ // Gets the last requested time for the favicon bitmap at |bitmap_id|.
+ // Returns true if successful.
+ bool GetFaviconBitmapLastRequestedTime(FaviconBitmapID bitmap_id,
+ base::Time* time);
+
// Adds a bitmap component at |pixel_size| for the favicon with |icon_id|.
// Only favicons representing a .ico file should have multiple favicon bitmaps
// per favicon.
@@ -111,6 +116,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 +251,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 +275,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();

Powered by Google App Engine
This is Rietveld 408576698