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

Unified Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 10802066: Adds support for saving favicon size into history database. (Closed) 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
Index: chrome/browser/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 57b0e5fa37dc3c5ccf2ddb481ba78a633492ca42..9c50489088dfd989e4717cdc8cff140841d54338 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -112,12 +112,12 @@ class ExtensionWebUIImageLoadingTracker : public ImageLoadingTracker::Observer {
const std::string& extension_id,
int index) OVERRIDE {
if (!image.IsEmpty()) {
- std::vector<unsigned char> image_data;
+ std::vector<unsigned char> bitmap_data;
if (!gfx::PNGCodec::EncodeBGRASkBitmap(*image.ToSkBitmap(), false,
- &image_data)) {
+ &bitmap_data)) {
NOTREACHED() << "Could not encode extension favicon";
}
- ForwardResult(base::RefCountedBytes::TakeVector(&image_data));
+ ForwardResult(base::RefCountedBytes::TakeVector(&bitmap_data));
} else {
ForwardResult(NULL);
}
@@ -132,7 +132,7 @@ class ExtensionWebUIImageLoadingTracker : public ImageLoadingTracker::Observer {
void ForwardResult(scoped_refptr<base::RefCountedMemory> icon_data) {
history::FaviconData favicon;
favicon.known_icon = icon_data.get() != NULL && icon_data->size() > 0;
- favicon.image_data = icon_data;
+ favicon.bitmap_data = icon_data;
favicon.icon_type = history::FAVICON;
request_->ForwardResultAsync(request_->handle(), favicon);
delete this;

Powered by Google App Engine
This is Rietveld 408576698