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

Unified Diff: chrome/browser/history/history_types.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, 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: chrome/browser/history/history_types.h
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index b12d97cbbc747eeb4a304d7f13c8060d37698773..f2440da7029cf4f8ca284c89a9e7798bcd5e079a 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -22,6 +22,7 @@
#include "chrome/common/thumbnail_score.h"
#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
+#include "ui/gfx/size.h"
class PageUsageData;
@@ -766,6 +767,18 @@ struct IconMapping {
// The type of icon.
IconType icon_type;
+
+ // The icon pixel size.
+ gfx::Size icon_pixel_size;
+};
+
+// Represents a favicon id and the size of the bitmap at that favicon id.
+struct FaviconIDAndSize {
+ FaviconIDAndSize();
+ ~FaviconIDAndSize();
+
+ FaviconID icon_id;
+ gfx::Size icon_size;
};
// Defines the favicon stored in history backend.
@@ -779,8 +792,15 @@ struct FaviconData {
// Indicates whether the icon is known by the history backend.
bool known_icon;
- // The bits of image.
- scoped_refptr<base::RefCountedMemory> image_data;
+ // The bits of bitmap.
+ scoped_refptr<base::RefCountedMemory> bitmap_data;
+
+ // The requested size used to insert |bitmap_data| into the database.
+ // Requested size is the size for which |bitmap_data| was the closest
+ // match from the site's available favicons at the time that |bitmap_data|
+ // was added to the history database.
+ // |requested_size| does not need to match with the bitmap's pixel size.
+ gfx::Size requested_size;
// Indicates whether image is expired.
bool expired;

Powered by Google App Engine
This is Rietveld 408576698