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

Unified Diff: chrome/browser/history/history_backend.cc

Issue 10821035: wip Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 2098ec2dd59f820712d73497e149e410eb9bd961..97ba5e3293ace26c477d8af65f42c2c56bb69196 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1943,6 +1943,8 @@ FaviconID HistoryBackend::GetFaviconID(
// Find favicon size which most closely matches |desired_pixel_size|.
// Give preference to favicon sizes which will result in downscaling rather
// than upscaling.
+ // XXX needs to be closer to what cole wants. ideally, we'd just load
+ // all variants?
FaviconID closest_favicon_id = 0;
gfx::Size closest_pixel_size;
for (size_t i = 0; i < favicon_id_size_listing.size(); ++i) {
@@ -2552,13 +2554,15 @@ bool HistoryBackend::GetFaviconFromDB(FaviconID favicon_id,
scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
favicon->known_icon = true;
+ favicon->variants.resize(1); // XXX
if (!thumbnail_db_->GetFavicon(favicon_id, &last_updated, &data->data(),
- &favicon->icon_url, &favicon->pixel_size, &favicon->icon_type))
+ &favicon->icon_url, &favicon->variants[0].pixel_size,
+ &favicon->icon_type))
return false;
favicon->expired = (Time::Now() - last_updated) >
TimeDelta::FromDays(kFaviconRefetchDays);
- favicon->bitmap_data = data;
+ favicon->variants[0].bitmap_data = data;
return true;
}
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698