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

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

Issue 10378009: Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: k 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
diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc
index bdfd045c945c6d8b845c5bc4c221f2111eedd6b6..863bfc64c40a98de7014a1ae63c6b16501e3731d 100644
--- a/chrome/browser/history/top_sites_unittest.cc
+++ b/chrome/browser/history/top_sites_unittest.cc
@@ -166,11 +166,11 @@ class TopSitesTest : public HistoryUnitTestBase {
// Creates a bitmap of the specified color. Caller takes ownership.
gfx::Image CreateBitmap(SkColor color) {
- SkBitmap* thumbnail = new SkBitmap;
- thumbnail->setConfig(SkBitmap::kARGB_8888_Config, 4, 4);
- thumbnail->allocPixels();
- thumbnail->eraseColor(color);
- return gfx::Image(thumbnail); // takes ownership.
+ SkBitmap thumbnail;
+ thumbnail.setConfig(SkBitmap::kARGB_8888_Config, 4, 4);
+ thumbnail.allocPixels();
+ thumbnail.eraseColor(color);
+ return gfx::Image(thumbnail); // adds ref.
}
// 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