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

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, 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/history_backend_unittest.cc ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_types.h
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 82218fa9436cccad76e69c797bd6d6a6bcd59604..d50a634a75c52e43c0be7d4430dadec67c55cb09 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -656,6 +656,9 @@ bool RowQualifiesAsSignificant(const URLRow& row, const base::Time& threshold);
// Defines the icon types. They are also stored in icon_type field of favicons
// table.
+// The values of the IconTypes are used to select the priority in which favicon
+// data is returned in HistoryBackend and ThumbnailDatabase. Data for the
+// largest IconType takes priority if data for multiple IconTypes is available.
enum IconType {
INVALID_ICON = 0x0,
FAVICON = 1 << 0,
@@ -677,6 +680,9 @@ struct IconMapping {
// The unique id of the icon.
FaviconID icon_id;
+ // The url of the icon.
+ GURL icon_url;
+
// The type of icon.
IconType icon_type;
};
@@ -706,6 +712,10 @@ struct FaviconBitmapResult {
IconType icon_type;
};
+// Define type with same structure as FaviconBitmapResult for passing data to
+// HistoryBackend::SetFavicons().
+typedef FaviconBitmapResult FaviconBitmapData;
+
// Defines a gfx::Image of size desired_size_in_dip composed of image
// representations for each of the desired scale factors.
struct FaviconImageResult {
@@ -739,6 +749,18 @@ const FaviconSizes& GetDefaultFaviconSizes();
// A map from an icon URL to the FaviconSizes for that URL.
typedef std::map<GURL, FaviconSizes> IconURLSizesMap;
+// Defines a favicon bitmap and its associated pixel size.
+struct FaviconBitmapIDSize {
+ FaviconBitmapIDSize();
+ ~FaviconBitmapIDSize();
+
+ // The unique id of the favicon bitmap.
+ FaviconBitmapID bitmap_id;
+
+ // The pixel dimensions of the associated bitmap.
+ gfx::Size pixel_size;
+};
+
// Defines a favicon bitmap stored in the history backend.
struct FaviconBitmap {
FaviconBitmap();
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698