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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_icon.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/ui/app_list/arc/arc_app_icon.h ('k') | chrome/browser/ui/app_list/arc/arc_app_icon_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_app_icon.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_icon.cc b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
index 301e040315acac49dd2f915b0c17329470bb23b0..14183f0537f322ebba2b64f1d86e27b645f8dadc 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_icon.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/task_runner_util.h"
#include "chrome/browser/image_decoder.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
@@ -220,29 +221,30 @@ void ArcAppIcon::RequestIcon(ui::ScaleFactor scale_factor) {
}
// static
-scoped_ptr<ArcAppIcon::ReadResult> ArcAppIcon::ReadOnFileThread(
+std::unique_ptr<ArcAppIcon::ReadResult> ArcAppIcon::ReadOnFileThread(
ui::ScaleFactor scale_factor,
const base::FilePath& path) {
DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
DCHECK(!path.empty());
if (!base::PathExists(path))
- return make_scoped_ptr(new ArcAppIcon::ReadResult(
+ return base::WrapUnique(new ArcAppIcon::ReadResult(
ArcAppIcon::ReadResult::Status::REQUEST_TO_INSTALL, scale_factor));
// Read the file from disk.
std::string unsafe_icon_data;
if (!base::ReadFileToString(path, &unsafe_icon_data)) {
VLOG(2) << "Failed to read an ARC icon from file " << path.MaybeAsASCII();
- return make_scoped_ptr(new ArcAppIcon::ReadResult(
+ return base::WrapUnique(new ArcAppIcon::ReadResult(
ArcAppIcon::ReadResult::Status::FAIL, scale_factor));
}
- return make_scoped_ptr(new ArcAppIcon::ReadResult(scale_factor,
- unsafe_icon_data));
+ return base::WrapUnique(
+ new ArcAppIcon::ReadResult(scale_factor, unsafe_icon_data));
}
-void ArcAppIcon::OnIconRead(scoped_ptr<ArcAppIcon::ReadResult> read_result) {
+void ArcAppIcon::OnIconRead(
+ std::unique_ptr<ArcAppIcon::ReadResult> read_result) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
switch (read_result->status) {
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_icon.h ('k') | chrome/browser/ui/app_list/arc/arc_app_icon_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698