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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 1911823002: Convert //third_party from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update crashpad's README.chromium 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: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 3d54d183d45c788781a07535a948d0302f7df7be..200a12a17ec94e6425319f4e78c91031a97fc11e 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -4,6 +4,7 @@
#include "third_party/leveldatabase/env_chromium.h"
+#include <memory>
#include <utility>
#if defined(OS_POSIX)
@@ -181,7 +182,7 @@ class ChromiumSequentialFile : public leveldb::SequentialFile {
private:
std::string filename_;
- scoped_ptr<base::File> file_;
+ std::unique_ptr<base::File> file_;
const UMALogger* uma_logger_;
};
@@ -232,7 +233,7 @@ class ChromiumWritableFile : public leveldb::WritableFile {
leveldb::Status SyncParent();
std::string filename_;
- scoped_ptr<base::File> file_;
+ std::unique_ptr<base::File> file_;
const UMALogger* uma_logger_;
Type file_type_;
std::string parent_dir_;
@@ -809,7 +810,7 @@ Status ChromiumEnv::GetTestDirectory(std::string* path) {
Status ChromiumEnv::NewLogger(const std::string& fname,
leveldb::Logger** result) {
FilePath path = FilePath::FromUTF8Unsafe(fname);
- scoped_ptr<base::File> f(new base::File(
+ std::unique_ptr<base::File> f(new base::File(
path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE));
if (!f->IsValid()) {
*result = NULL;
@@ -825,7 +826,7 @@ Status ChromiumEnv::NewLogger(const std::string& fname,
Status ChromiumEnv::NewSequentialFile(const std::string& fname,
leveldb::SequentialFile** result) {
FilePath path = FilePath::FromUTF8Unsafe(fname);
- scoped_ptr<base::File> f(
+ std::unique_ptr<base::File> f(
new base::File(path, base::File::FLAG_OPEN | base::File::FLAG_READ));
if (!f->IsValid()) {
*result = NULL;
@@ -872,7 +873,7 @@ Status ChromiumEnv::NewWritableFile(const std::string& fname,
leveldb::WritableFile** result) {
*result = NULL;
FilePath path = FilePath::FromUTF8Unsafe(fname);
- scoped_ptr<base::File> f(new base::File(
+ std::unique_ptr<base::File> f(new base::File(
path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE));
if (!f->IsValid()) {
RecordErrorAt(kNewWritableFile);
@@ -888,7 +889,7 @@ Status ChromiumEnv::NewAppendableFile(const std::string& fname,
leveldb::WritableFile** result) {
*result = NULL;
FilePath path = FilePath::FromUTF8Unsafe(fname);
- scoped_ptr<base::File> f(new base::File(
+ std::unique_ptr<base::File> f(new base::File(
path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_APPEND));
if (!f->IsValid()) {
RecordErrorAt(kNewAppendableFile);
« no previous file with comments | « third_party/leveldatabase/chromium_logger.h ('k') | third_party/libaddressinput/chromium/chrome_address_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698