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

Unified Diff: chrome/browser/custom_home_pages_table_model.cc

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed the comments Created 9 years, 9 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/custom_home_pages_table_model.cc
diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc
index 9f50616424f5283d90faafc12688d5314cca0cd1..017ba53bfcfc5cd6e41dc89d3c07445c0a42a5fc 100644
--- a/chrome/browser/custom_home_pages_table_model.cc
+++ b/chrome/browser/custom_home_pages_table_model.cc
@@ -164,7 +164,7 @@ void CustomHomePagesTableModel::LoadTitleAndFavIcon(Entry* entry) {
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
if (favicon_service) {
entry->fav_icon_handle = favicon_service->GetFaviconForURL(entry->url,
- &query_consumer_,
+ history::FAV_ICON, &query_consumer_,
NewCallback(this, &CustomHomePagesTableModel::OnGotFavIcon));
}
}
@@ -190,10 +190,7 @@ void CustomHomePagesTableModel::OnGotTitle(HistoryService::Handle handle,
void CustomHomePagesTableModel::OnGotFavIcon(
FaviconService::Handle handle,
- bool know_fav_icon,
- scoped_refptr<RefCountedMemory> image_data,
- bool is_expired,
- GURL icon_url) {
+ history::FaviconData favicon) {
int entry_index;
Entry* entry =
GetEntryByLoadHandle(&Entry::fav_icon_handle, handle, &entry_index);
@@ -202,11 +199,12 @@ void CustomHomePagesTableModel::OnGotFavIcon(
return;
}
entry->fav_icon_handle = 0;
- if (know_fav_icon && image_data.get() && image_data->size()) {
+ if (favicon.known_icon && favicon.image_data.get() &&
sky 2011/03/11 17:56:45 favicon.is_valid
+ favicon.image_data->size()) {
int width, height;
std::vector<unsigned char> decoded_data;
- if (gfx::PNGCodec::Decode(image_data->front(),
- image_data->size(),
+ if (gfx::PNGCodec::Decode(favicon.image_data->front(),
+ favicon.image_data->size(),
gfx::PNGCodec::FORMAT_BGRA, &decoded_data,
&width, &height)) {
entry->icon.setConfig(SkBitmap::kARGB_8888_Config, width, height);

Powered by Google App Engine
This is Rietveld 408576698