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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 10910212: Enable hidpi favicons for favicons history does not know about (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FaviconHandlerTest.* Created 8 years, 3 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/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 69d2e7d91ffba0a64a1558ed312862de113e54d0..5e0dfb5858f3c5a7fef9bbc39a75e3fb85d84325 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -30,6 +30,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "ui/gfx/codec/png_codec.h"
+#include "ui/gfx/image/image_skia.h"
#if defined(TOOLKIT_VIEWS)
#include "ui/views/widget/widget.h"
@@ -345,14 +346,8 @@ TabContents* InstantController::ReleasePreviewContents(InstantCommitType type) {
preview->profile(), Profile::EXPLICIT_ACCESS);
if (favicon_service && entry->GetFavicon().valid &&
entry->GetFavicon().image.IsEmpty()) {
- std::vector<unsigned char> image_data;
- // TODO: Add all variants once the history service supports it.
- gfx::PNGCodec::EncodeBGRASkBitmap(
- entry->GetFavicon().image.AsBitmap(), false, &image_data);
- favicon_service->SetFavicon(entry->GetURL(),
- entry->GetFavicon().url,
- image_data,
- history::FAVICON);
+ favicon_service->SetFavicons(entry->GetURL(), entry->GetFavicon().url,
+ history::FAVICON, entry->GetFavicon().image);
}
}

Powered by Google App Engine
This is Rietveld 408576698