Index: chrome/browser/history/history_backend.h |
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h |
index d462b2ecee302da0f863265a16192aa4d1f5bf62..f7735ec6c4646cc39c1888165feca8557658d60e 100644 |
--- a/chrome/browser/history/history_backend.h |
+++ b/chrome/browser/history/history_backend.h |
@@ -33,6 +33,7 @@ |
class HistoryURLProvider; |
struct HistoryURLProviderParams; |
struct ImportedFaviconUsage; |
+class SkBitmap; |
class TestingProfile; |
struct ThumbnailScore; |
@@ -266,8 +267,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, |
void SetFavicons(const GURL& page_url, |
favicon_base::IconType icon_type, |
- const std::vector<favicon_base::FaviconRawBitmapData>& |
- favicon_bitmap_data); |
+ const GURL& icon_url, |
+ const std::vector<SkBitmap>& bitmaps); |
void SetFaviconsOutOfDateForPage(const GURL& page_url); |
@@ -546,7 +547,6 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, |
GetFaviconsFromDBNoFaviconBitmaps); |
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
GetFaviconsFromDBSelectClosestMatch); |
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBSingleIconURL); |
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBIconType); |
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBExpired); |
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
@@ -689,28 +689,15 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, |
std::vector<favicon_base::FaviconRawBitmapResult>* results); |
// Set the favicon bitmaps for |icon_id|. |
- // For each entry in |favicon_bitmap_data|, if a favicon bitmap already |
- // exists at the entry's pixel size, replace the favicon bitmap's data with |
- // the entry's bitmap data. Otherwise add a new favicon bitmap. |
- // Any favicon bitmaps already mapped to |icon_id| whose pixel sizes are not |
- // in |favicon_bitmap_data| are deleted. |
- // If not NULL, |favicon_bitmaps_changed| is set to whether any of the bitmap |
- // data at |icon_id| is changed as a result of calling this method. |
- // Computing |favicon_bitmaps_changed| requires additional database queries |
- // so should be avoided if unnecessary. |
- void SetFaviconBitmaps(favicon_base::FaviconID icon_id, |
- const std::vector<favicon_base::FaviconRawBitmapData>& |
- favicon_bitmap_data, |
- bool* favicon_bitmaps_changed); |
- |
- // Returns true if |favicon_bitmap_data| passed to SetFavicons() is valid. |
- // Criteria: |
- // 1) |favicon_bitmap_data| contains no more than |
- // kMaxFaviconsPerPage unique icon URLs. |
- // kMaxFaviconBitmapsPerIconURL favicon bitmaps for each icon URL. |
- // 2) FaviconRawBitmapData::bitmap_data contains non NULL bitmap data. |
- bool ValidateSetFaviconsParams(const std::vector< |
- favicon_base::FaviconRawBitmapData>& favicon_bitmap_data) const; |
+ // For each entry in |bitmaps|, if a favicon bitmap already exists at the |
+ // entry's pixel size, replace the favicon bitmap's data with the entry's |
+ // bitmap data. Otherwise add a new favicon bitmap. |
+ // Any favicon bitmaps already mapped to |icon_id| whose pixel size does not |
+ // match the pixel size of one of |bitmaps| is deleted. |
+ // Returns true if any of the bitmap data at |icon_id| is changed as a result |
+ // of calling this method. |
+ bool SetFaviconBitmaps(favicon_base::FaviconID icon_id, |
+ const std::vector<SkBitmap>& bitmaps); |
// Returns true if the bitmap data at |bitmap_id| equals |new_bitmap_data|. |
bool IsFaviconBitmapDataEqual( |