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

Unified Diff: chrome/browser/history/thumbnail_database.h

Issue 10802066: Adds support for saving favicon size into history database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « chrome/browser/history/select_favicon_frames.cc ('k') | chrome/browser/history/thumbnail_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/thumbnail_database.h
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index 10a8198c9cfc810bbc70a8eff2d00e4358550ed6..c9f4dc885acf09c7806ffdcc12d628b8bc691355 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -99,11 +99,28 @@ class ThumbnailDatabase {
// Favicon Bitmaps -----------------------------------------------------------
+ // Returns true if there are favicon bitmaps for |icon_id|. If
+ // |bitmap_id_sizes| is non NULL, sets it to a list of the favicon bitmap ids
+ // and their associated pixel sizes for the favicon with |icon_id|.
+ // The list contains results for the bitmaps which are cached in the
+ // favicon_bitmaps table. The pixel sizes are a subset of the sizes in the
+ // 'sizes' field of the favicons table for |icon_id|.
+ bool GetFaviconBitmapIDSizes(
+ FaviconID icon_id,
+ std::vector<FaviconBitmapIDSize>* bitmap_id_sizes);
+
// Returns true if there are any matched bitmaps for the given |icon_id|. All
// matched results are returned if |favicon_bitmaps| is not NULL.
bool GetFaviconBitmaps(FaviconID icon_id,
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.
+ bool GetFaviconBitmap(FaviconBitmapID bitmap_id,
+ base::Time* last_updated,
+ scoped_refptr<base::RefCountedMemory>* png_icon_data,
+ gfx::Size* pixel_size);
+
// 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.
@@ -118,10 +135,21 @@ class ThumbnailDatabase {
base::Time time,
const gfx::Size& pixel_size);
+ // Sets the bitmap data and the last updated time for the favicon bitmap at
+ // |bitmap_id|.
+ // Returns true if successful.
+ bool SetFaviconBitmap(FaviconBitmapID bitmap_id,
+ scoped_refptr<base::RefCountedMemory> bitmap_data,
+ base::Time time);
+
// Deletes the favicon bitmaps for the favicon with with |icon_id|.
// Returns true if successful.
bool DeleteFaviconBitmapsForFavicon(FaviconID icon_id);
+ // Deletes the favicon bitmap with |bitmap_id|.
+ // Returns true if successful.
+ bool DeleteFaviconBitmap(FaviconBitmapID bitmap_id);
+
// Favicons ------------------------------------------------------------------
// Updates the favicon sizes associated with a favicon to |favicon_sizes|.
« no previous file with comments | « chrome/browser/history/select_favicon_frames.cc ('k') | chrome/browser/history/thumbnail_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698