Index: chrome/browser/icon_loader_win.cc |
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc |
index 279c819cc4921be1305b31d9d2ef7a55d8c71c81..035c759e42bf6a19c5ddd051d94bdad3c9a87ed9 100644 |
--- a/chrome/browser/icon_loader_win.cc |
+++ b/chrome/browser/icon_loader_win.cc |
@@ -8,6 +8,7 @@ |
#include <shellapi.h> |
#include "base/bind.h" |
+#include "base/memory/ptr_util.h" |
#include "base/message_loop/message_loop.h" |
#include "base/threading/thread.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
@@ -49,7 +50,7 @@ void IconLoader::ReadIcon() { |
NOTREACHED(); |
} |
- image_.reset(); |
+ std::unique_ptr<gfx::Image> image; |
SHFILEINFO file_info = { 0 }; |
if (SHGetFileInfo(group_.c_str(), FILE_ATTRIBUTE_NORMAL, &file_info, |
@@ -61,12 +62,12 @@ void IconLoader::ReadIcon() { |
gfx::ImageSkia image_skia(gfx::ImageSkiaRep(*bitmap, |
display::win::GetDPIScale())); |
image_skia.MakeThreadSafe(); |
- image_.reset(new gfx::Image(image_skia)); |
+ image = base::MakeUnique<gfx::Image>(image_skia); |
DestroyIcon(file_info.hIcon); |
} |
} |
target_task_runner_->PostTask( |
- FROM_HERE, base::Bind(callback_, base::Passed(&image_), group_)); |
+ FROM_HERE, base::Bind(callback_, base::Passed(&image), group_)); |
delete this; |
} |