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

Unified Diff: chrome/browser/ui/toolbar/back_forward_menu_model.cc

Issue 10832128: Convert FaviconStatus::bitmap from SkBitmap to gfx::Image. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests? Created 8 years, 4 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: chrome/browser/ui/toolbar/back_forward_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 53c2cf5d990e72e57a390345707a94afc543d36b..7673fd632a4eaede2cad53f64eb7fd8d48441f3a 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -142,7 +142,7 @@ bool BackForwardMenuModel::GetIconAt(int index, gfx::ImageSkia* icon) {
IDR_HISTORY_FAVICON);
} else {
NavigationEntry* entry = GetNavigationEntry(index);
- *icon = entry->GetFavicon().bitmap;
+ *icon = *entry->GetFavicon().image.ToImageSkia();
if (!entry->GetFavicon().valid && menu_model_delegate()) {
FetchFavicon(entry);
}
@@ -285,7 +285,9 @@ void BackForwardMenuModel::OnFavIconDataAvailable(
entry->GetFavicon().url = favicon.icon_url;
if (fav_icon.empty())
return;
- entry->GetFavicon().bitmap = fav_icon;
+ // TODO: Once the history service returns more representations,
+ // use them all instead of having just the lodpi favicon.
+ entry->GetFavicon().image = gfx::Image(fav_icon);
if (menu_model_delegate()) {
menu_model_delegate()->OnIconChanged(model_index);
}

Powered by Google App Engine
This is Rietveld 408576698