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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.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/intents/web_intent_picker_controller.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 90788a3b2c4a38591010c60ed75570a493aa4b19..c4edcf2cb5b16dcff4b484bccf3bcc209d9d813a 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -578,13 +578,16 @@ void WebIntentPickerController::RegistryCallsCompleted() {
}
void WebIntentPickerController::OnFaviconDataAvailable(
- FaviconService::Handle handle, history::FaviconData favicon_data) {
+ FaviconService::Handle handle,
+ history::FaviconData favicon_data,
+ std::vector<GURL> icon_urls_in_db) {
size_t index = favicon_consumer_.GetClientDataForCurrentRequest();
- if (favicon_data.is_valid()) {
+ if (favicon_data.has_valid_bitmaps()) {
SkBitmap icon_bitmap;
- if (gfx::PNGCodec::Decode(favicon_data.image_data->front(),
- favicon_data.image_data->size(),
+ scoped_refptr<base::RefCountedMemory> bitmap_data(
+ favicon_data.first_bitmap());
+ if (gfx::PNGCodec::Decode(bitmap_data->front(), bitmap_data->size(),
&icon_bitmap)) {
gfx::Image icon_image(icon_bitmap);
picker_model_->UpdateFaviconAt(index, icon_image);

Powered by Google App Engine
This is Rietveld 408576698