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

Unified Diff: chrome/browser/profiles/profile_info_util.cc

Issue 9477016: Remove all |gfx::Image(new SkBitmap(...))| antipatterns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/icon_loader_mac.mm ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_util.cc
diff --git a/chrome/browser/profiles/profile_info_util.cc b/chrome/browser/profiles/profile_info_util.cc
index 27d212896dbc2eb3f55d3e2850190f6903853448..a0d6a142e1b4abdb18be68ccc354f968afe08001 100644
--- a/chrome/browser/profiles/profile_info_util.cc
+++ b/chrome/browser/profiles/profile_info_util.cc
@@ -32,7 +32,7 @@ gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
SkColor color = SkColorSetARGB(83, 0, 0, 0);
canvas.DrawRect(gfx::Rect(x, y, length - 1, length - 1), color);
- return gfx::Image(new SkBitmap(canvas.ExtractBitmap()));
+ return gfx::Image(canvas.ExtractBitmap());
}
gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
@@ -50,7 +50,7 @@ gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
int y = (kAvatarIconHeight - length) / 2;
canvas.DrawBitmapInt(bmp, x, y);
- return gfx::Image(new SkBitmap(canvas.ExtractBitmap()));
+ return gfx::Image(canvas.ExtractBitmap());
}
gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
@@ -88,7 +88,7 @@ gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
canvas.DrawLine(gfx::Point(x2 - 1, y1 + 1), gfx::Point(x2 - 1, y2 - 1),
shadow_color);
- return gfx::Image(new SkBitmap(canvas.ExtractBitmap()));
+ return gfx::Image(canvas.ExtractBitmap());
}
} // namespace
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698