Index: chrome/browser/favicon/favicon_handler.cc |
diff --git a/chrome/browser/favicon/favicon_handler.cc b/chrome/browser/favicon/favicon_handler.cc |
index 80c4883a40fa7f91a58cf4e215da9c9f015678c8..b356664535f20b497c2b92d357b2277658dd73f4 100644 |
--- a/chrome/browser/favicon/favicon_handler.cc |
+++ b/chrome/browser/favicon/favicon_handler.cc |
@@ -416,8 +416,8 @@ void FaviconHandler::OnFaviconDataForInitialURL( |
// to be expired (or the wrong url) we'll fetch later on. This way the |
// user doesn't see a flash of the default favicon. |
entry->GetFavicon().url = favicon.icon_url; |
- if (favicon.is_valid()) |
- UpdateFavicon(entry, favicon.bitmap_data); |
+ if (favicon.is_valid() && favicon.variants.size() > 0) |
+ UpdateFavicon(entry, favicon.variants[0].bitmap_data); // XXX pass all variants |
entry->GetFavicon().valid = true; |
} |
@@ -481,11 +481,11 @@ void FaviconHandler::OnFaviconData(FaviconService::Handle handle, |
// No need to update the favicon url. By the time we get here |
// UpdateFaviconURL will have set the favicon url. |
if (favicon.icon_type == history::FAVICON) { |
- if (favicon.is_valid()) { |
+ if (favicon.is_valid() && favicon.variants.size() > 0) { |
// There is a favicon, set it now. If expired we'll download the current |
// one again, but at least the user will get some icon instead of the |
// default and most likely the current one is fine anyway. |
- UpdateFavicon(entry, favicon.bitmap_data); |
+ UpdateFavicon(entry, favicon.variants[0].bitmap_data); // XXX all |
} |
if (!favicon.known_icon || favicon.expired) { |
// We don't know the favicon, or it is out of date. Request the current |