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

Unified Diff: chrome/browser/icon_loader_chromeos.cc

Issue 2709683002: Remove unneeded IconLoader::image_ (Closed)
Patch Set: fix Created 3 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_auralinux.cc ('k') | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_chromeos.cc
diff --git a/chrome/browser/icon_loader_chromeos.cc b/chrome/browser/icon_loader_chromeos.cc
index 35539fd35dddb1e5c0dec5cdef781a0ab31971fe..52ae44d7b2d49be7f0d268e3dbec62355062d325 100644
--- a/chrome/browser/icon_loader_chromeos.cc
+++ b/chrome/browser/icon_loader_chromeos.cc
@@ -14,6 +14,7 @@
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
@@ -202,8 +203,8 @@ void IconLoader::ReadIcon() {
gfx::ImageSkia image_skia(ResizeImage(*(rb.GetImageNamed(idr)).ToImageSkia(),
IconSizeToDIPSize(icon_size_)));
image_skia.MakeThreadSafe();
- image_.reset(new gfx::Image(image_skia));
+ std::unique_ptr<gfx::Image> image = base::MakeUnique<gfx::Image>(image_skia);
target_task_runner_->PostTask(
- FROM_HERE, base::Bind(callback_, base::Passed(&image_), group_));
+ FROM_HERE, base::Bind(callback_, base::Passed(&image), group_));
delete this;
}
« no previous file with comments | « chrome/browser/icon_loader_auralinux.cc ('k') | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698