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

Unified Diff: chrome/browser/ui/search_engines/template_url_table_model.cc

Issue 10870022: Change FaviconData to be able to return data for multiple bitmaps for same icon URL (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/search_engines/template_url_table_model.cc
diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc
index 280f386e47eb282443a1d4cc7a5d6a06a79dc28a..85c8e6b6ca8f32a549c3c899b8b1fcdca61cf269 100644
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
@@ -100,12 +100,17 @@ class ModelEntry {
void OnFaviconDataAvailable(
FaviconService::Handle handle,
- history::FaviconData favicon) {
+ history::FaviconData favicon_data,
+ std::vector<GURL> icon_urls_in_db) {
load_state_ = LOADED;
- if (favicon.is_valid() && gfx::PNGCodec::Decode(favicon.image_data->front(),
- favicon.image_data->size(),
- &favicon_)) {
- model_->FaviconAvailable(this);
+ if (favicon_data.has_valid_bitmaps()) {
+ scoped_refptr<base::RefCountedMemory> bitmap_data(
+ favicon_data.first_bitmap());
+ if (gfx::PNGCodec::Decode(bitmap_data->front(),
+ bitmap_data->size(),
+ &favicon_)) {
+ model_->FaviconAvailable(this);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698