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

Unified Diff: chrome/browser/history/top_sites_unittest.cc

Issue 10332163: Revert 137075 - Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « chrome/browser/history/history_tab_helper.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_unittest.cc
===================================================================
--- chrome/browser/history/top_sites_unittest.cc (revision 137075)
+++ chrome/browser/history/top_sites_unittest.cc (working copy)
@@ -166,11 +166,11 @@
// Creates a bitmap of the specified color. Caller takes ownership.
gfx::Image CreateBitmap(SkColor color) {
- SkBitmap thumbnail;
- thumbnail.setConfig(SkBitmap::kARGB_8888_Config, 4, 4);
- thumbnail.allocPixels();
- thumbnail.eraseColor(color);
- return gfx::Image(thumbnail); // adds ref.
+ SkBitmap* thumbnail = new SkBitmap;
+ thumbnail->setConfig(SkBitmap::kARGB_8888_Config, 4, 4);
+ thumbnail->allocPixels();
+ thumbnail->eraseColor(color);
+ return gfx::Image(thumbnail); // takes ownership.
}
// Forces top sites to load top sites from history, then recreates top sites.
« no previous file with comments | « chrome/browser/history/history_tab_helper.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698