| Index: chrome/browser/history/thumbnail_database.h
|
| diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
|
| index 2364332e9e3e8752b43841be3efbbc2460e6ed04..63f3ddbe8d9bb80a9735e30d2562c85ec7a30593 100644
|
| --- a/chrome/browser/history/thumbnail_database.h
|
| +++ b/chrome/browser/history/thumbnail_database.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
|
|
|
| #include <vector>
|
| +#include <utility>
|
|
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/ref_counted.h"
|
| @@ -109,16 +110,16 @@ class ThumbnailDatabase {
|
| // Sets the time the favicon was last updated.
|
| bool SetFaviconLastUpdateTime(FaviconID icon_id, base::Time time);
|
|
|
| - // Returns the id of the entry in the favicon database with the specified url
|
| - // and icon type. If |required_icon_type| contains multiple icon types and
|
| - // there are more than one matched icon in database, only one icon will be
|
| - // returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and
|
| - // FAVICON, and the icon type is returned in icon_type parameter if it is not
|
| - // NULL.
|
| - // Returns 0 if no entry exists for the specified url.
|
| - FaviconID GetFaviconIDForFaviconURL(const GURL& icon_url,
|
| - int required_icon_type,
|
| - IconType* icon_type);
|
| + // Returns list of favicon ids and the sizes of their associated bitmaps in
|
| + // the favicon database with the specified url and icon type. If
|
| + // |required_icon_types| contains multiple icon types and there is more than
|
| + // one matched icon type in the database, icons of only a single icon type
|
| + // will be returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON,
|
| + // and FAVICON.
|
| + void GetFaviconIDsForFaviconURL(
|
| + const GURL& icon_url,
|
| + const int required_icon_types,
|
| + std::vector<FaviconIDAndSize>* id_size_listing);
|
|
|
| // Gets the png encoded favicon, last updated time, icon_url and icon_type for
|
| // the specified favicon id.
|
| @@ -126,23 +127,29 @@ class ThumbnailDatabase {
|
| base::Time* last_updated,
|
| std::vector<unsigned char>* png_icon_data,
|
| GURL* icon_url,
|
| + gfx::Size* pixel_size,
|
| IconType* icon_type);
|
|
|
| // Adds the favicon URL and icon type to the favicon db, returning its id.
|
| - FaviconID AddFavicon(const GURL& icon_url, IconType icon_type);
|
| + FaviconID AddFavicon(const GURL& icon_url,
|
| + const gfx::Size& pixel_size,
|
| + IconType icon_type);
|
|
|
| // Delete the favicon with the provided id. Returns false on failure
|
| bool DeleteFavicon(FaviconID id);
|
|
|
| // Icon Mapping --------------------------------------------------------------
|
| //
|
| - // Returns true if there is a matched icon mapping for the given page and
|
| - // icon type.
|
| - // The matched icon mapping is returned in the icon_mapping parameter if it is
|
| - // not NULL.
|
| - bool GetIconMappingForPageURL(const GURL& page_url,
|
| - IconType required_icon_type,
|
| - IconMapping* icon_mapping);
|
| + // Returns true if there are icon mappings for the given page and icon type.
|
| + // If |required_icon_types| contains multiple icon types and there is more
|
| + // than on matched icon type in the database, icons of only a single type
|
| + // will be returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON,
|
| + // and FAVICON.
|
| + // The matched icon mappings are returned in the icon_mappings parameter if
|
| + // it is not NULL.
|
| + bool GetIconMappingsForPageURL(const GURL& page_url,
|
| + int required_icon_types,
|
| + std::vector<IconMapping>* icon_mappings);
|
|
|
| // Returns true if there is any matched icon mapping for the given page.
|
| // All matched icon mappings are returned in descent order of IconType if
|
|
|