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

Unified Diff: chrome/browser/icon_loader_win.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/icon_loader_linux.cc ('k') | chrome/browser/profiles/gaia_info_update_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_win.cc
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index f51c0649900657de51841b58c9a765f84caf9642..c217bffcd1319b89f8228d2199c12b388af23eb3 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/message_loop.h"
#include "base/threading/thread.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/icon_util.h"
#include "ui/gfx/size.h"
@@ -34,8 +35,9 @@ void IconLoader::ReadIcon() {
SHGFI_ICON | size | SHGFI_USEFILEATTRIBUTES))
return;
- image_.reset(new gfx::Image(
- IconUtil::CreateSkBitmapFromHICON(file_info.hIcon)));
+ scoped_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(
+ file_info.hIcon));
+ image_.reset(new gfx::Image(*bitmap));
DestroyIcon(file_info.hIcon);
target_message_loop_->PostTask(FROM_HERE,
base::Bind(&IconLoader::NotifyDelegate, this));
« no previous file with comments | « chrome/browser/icon_loader_linux.cc ('k') | chrome/browser/profiles/gaia_info_update_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698