| Index: chrome/browser/icon_loader_auralinux.cc
|
| diff --git a/chrome/browser/icon_loader_auralinux.cc b/chrome/browser/icon_loader_auralinux.cc
|
| index 449d05771d76648cce40da5091ee722085971f86..a1c098b9ed32fb43012b63389a1b44c485138625 100644
|
| --- a/chrome/browser/icon_loader_auralinux.cc
|
| +++ b/chrome/browser/icon_loader_auralinux.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/icon_loader.h"
|
|
|
| #include "base/bind.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/nix/mime_util_xdg.h"
|
| #include "ui/views/linux_ui/linux_ui.h"
|
| @@ -38,14 +39,16 @@ void IconLoader::ReadIcon() {
|
| NOTREACHED();
|
| }
|
|
|
| + std::unique_ptr<gfx::Image> image;
|
| views::LinuxUI* ui = views::LinuxUI::instance();
|
| if (ui) {
|
| - gfx::Image image = ui->GetIconForContentType(group_, size_pixels);
|
| - if (!image.IsEmpty())
|
| - image_.reset(new gfx::Image(image));
|
| + image = base::MakeUnique<gfx::Image>(
|
| + ui->GetIconForContentType(group_, size_pixels));
|
| + if (image->IsEmpty())
|
| + image = nullptr;
|
| }
|
|
|
| target_task_runner_->PostTask(
|
| - FROM_HERE, base::Bind(callback_, base::Passed(&image_), group_));
|
| + FROM_HERE, base::Bind(callback_, base::Passed(&image), group_));
|
| delete this;
|
| }
|
|
|