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

Unified Diff: chrome/browser/ui/webui/extension_icon_source.cc

Issue 7397021: Re-land r93365 - add RefCountedString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 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/ui/webui/extension_icon_source.cc
diff --git a/chrome/browser/ui/webui/extension_icon_source.cc b/chrome/browser/ui/webui/extension_icon_source.cc
index b38c273c60354130b999e3dd44629ab7b0e8972d..78c7b27b8f8889f3e86cccd4b6de25549d54f9bf 100644
--- a/chrome/browser/ui/webui/extension_icon_source.cc
+++ b/chrome/browser/ui/webui/extension_icon_source.cc
@@ -31,12 +31,8 @@
namespace {
scoped_refptr<RefCountedMemory> BitmapToMemory(SkBitmap* image) {
- std::vector<unsigned char> output;
- gfx::PNGCodec::EncodeBGRASkBitmap(*image, false, &output);
-
- scoped_refptr<RefCountedBytes> image_bytes(new RefCountedBytes);
- image_bytes->data.resize(output.size());
- std::copy(output.begin(), output.end(), image_bytes->data.begin());
+ RefCountedBytes* image_bytes = new RefCountedBytes;
+ gfx::PNGCodec::EncodeBGRASkBitmap(*image, false, &image_bytes->data());
return image_bytes;
}
« no previous file with comments | « chrome/browser/ui/webui/collected_cookies_ui_delegate.cc ('k') | chrome/browser/ui/webui/fileicon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698