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

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

Issue 10802066: Adds support for saving favicon size into history database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 7673fd632a4eaede2cad53f64eb7fd8d48441f3a..15926ed5d736336b4eb5c4162686e382d521238a 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -253,8 +253,8 @@ void BackForwardMenuModel::FetchFavicon(NavigationEntry* entry) {
void BackForwardMenuModel::OnFavIconDataAvailable(
FaviconService::Handle handle,
- history::FaviconData favicon) {
- if (favicon.is_valid()) {
+ history::FaviconData favicon_data) {
+ if (favicon_data.is_valid()) {
int unique_id = load_consumer_.GetClientDataForCurrentRequest();
// Find the current model_index for the unique_id.
NavigationEntry* entry = NULL;
@@ -277,12 +277,13 @@ void BackForwardMenuModel::OnFavIconDataAvailable(
// Now that we have a valid NavigationEntry, decode the favicon and assign
// it to the NavigationEntry.
+ const history::FaviconDataElement& element = favicon_data.elements[0];
SkBitmap fav_icon;
- if (gfx::PNGCodec::Decode(favicon.image_data->front(),
- favicon.image_data->size(),
+ if (gfx::PNGCodec::Decode(element.bitmap_data->front(),
+ element.bitmap_data->size(),
&fav_icon)) {
entry->GetFavicon().valid = true;
- entry->GetFavicon().url = favicon.icon_url;
+ entry->GetFavicon().url = element.icon_url;
if (fav_icon.empty())
return;
// TODO: Once the history service returns more representations,

Powered by Google App Engine
This is Rietveld 408576698