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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc

Issue 1870793002: Convert //chrome/browser/chromeos 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
Index: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc b/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
index 88922f2802eb55183be2a588e0cc8959ebbabc3b..7f5795953789c2322003285004dccee7617e5ad1 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc
@@ -10,6 +10,7 @@
#include <string>
#include <utility>
+#include "base/memory/ptr_util.h"
#include "chrome/common/extensions/api/file_system_provider.h"
#include "chrome/common/extensions/api/file_system_provider_internal.h"
@@ -19,7 +20,7 @@ namespace operations {
namespace {
// Convert |value| into |output|. If parsing fails, then returns false.
-bool ConvertRequestValueToFileInfo(scoped_ptr<RequestValue> value,
+bool ConvertRequestValueToFileInfo(std::unique_ptr<RequestValue> value,
int fields,
bool root_entry,
EntryMetadata* output) {
@@ -174,16 +175,16 @@ bool GetMetadata::Execute(int request_id) {
}
void GetMetadata::OnSuccess(int /* request_id */,
- scoped_ptr<RequestValue> result,
+ std::unique_ptr<RequestValue> result,
bool has_more) {
- scoped_ptr<EntryMetadata> metadata(new EntryMetadata);
+ std::unique_ptr<EntryMetadata> metadata(new EntryMetadata);
const bool convert_result = ConvertRequestValueToFileInfo(
std::move(result), fields_,
entry_path_.AsUTF8Unsafe() == FILE_PATH_LITERAL("/"), metadata.get());
if (!convert_result) {
LOG(ERROR) << "Failed to parse a response for the get metadata operation.";
- callback_.Run(make_scoped_ptr<EntryMetadata>(NULL),
+ callback_.Run(base::WrapUnique<EntryMetadata>(NULL),
base::File::FILE_ERROR_IO);
return;
}
@@ -192,9 +193,9 @@ void GetMetadata::OnSuccess(int /* request_id */,
}
void GetMetadata::OnError(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
+ std::unique_ptr<RequestValue> /* result */,
base::File::Error error) {
- callback_.Run(make_scoped_ptr<EntryMetadata>(NULL), error);
+ callback_.Run(base::WrapUnique<EntryMetadata>(NULL), error);
}
} // namespace operations

Powered by Google App Engine
This is Rietveld 408576698