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

Unified Diff: components/favicon_base/favicon_types.h

Issue 1119163003: Save large icons to a new LARGE_ICON type Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Sam's initial feedback. Created 5 years, 8 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/favicon_base/favicon_types.h
diff --git a/components/favicon_base/favicon_types.h b/components/favicon_base/favicon_types.h
index 469d0fa10b9890fee0cb5a83dc0aa2d71e8999a7..dfa7dbf00c9eba329ac2cad265d862606228ea4b 100644
--- a/components/favicon_base/favicon_types.h
+++ b/components/favicon_base/favicon_types.h
@@ -19,14 +19,30 @@ typedef int64 FaviconID;
// 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.
+//
+// Note: LARGE_ICON is a virtual icon type. In desktop environments, where
+// favicons are small by default and larger touch icons are not the norm,
huangs 2015/05/04 20:00:44 NIT: the indent's a bit unusual, but your call.
Roger McFarlane (Chromium) 2015/05/04 20:16:56 Done.
+// it denotes the largest available icon the determined to be available. The
+// underlying icon may have originated as a large FAVICON, a TOUCH_ICON, or
+// a TOUCH_PRECOMPOSED_ICON. In mobile environments, larger sized icons are
+// generally captured by default, so additional LARGE_ICON tagged icons are
+// not stored. The LARGE_ICON type tag is only applied at the storage and
+// query layers; icons are recognized using their true underlying type and,
+// if it is determined that a large icon is desired but will not otherwise
+// be captured, the backend selects the best candidate and saves it using
+// the LARGE_ICON type. When querying for a large icon, all potential icon
+// types are considered, and the returned results are evaluted based on
+// the requested size.
enum IconType {
INVALID_ICON = 0x0,
FAVICON = 1 << 0,
TOUCH_ICON = 1 << 1,
- TOUCH_PRECOMPOSED_ICON = 1 << 2
+ TOUCH_PRECOMPOSED_ICON = 1 << 2,
+ LARGE_ICON = 1 << 3
};
// Defines a gfx::Image of size desired_size_in_dip composed of image

Powered by Google App Engine
This is Rietveld 408576698