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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 1550693002: Global conversion of Pass()→std::move() on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « sql/recovery_unittest.cc ('k') | third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 0b57c6de549e25e6d830e1e0d4ab256b690c9407..3d54d183d45c788781a07535a948d0302f7df7be 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -4,6 +4,8 @@
#include "third_party/leveldatabase/env_chromium.h"
+#include <utility>
+
#if defined(OS_POSIX)
#include <dirent.h>
#include <sys/types.h>
@@ -188,7 +190,7 @@ class ChromiumRandomAccessFile : public leveldb::RandomAccessFile {
ChromiumRandomAccessFile(const std::string& fname,
base::File file,
const UMALogger* uma_logger)
- : filename_(fname), file_(file.Pass()), uma_logger_(uma_logger) {}
+ : filename_(fname), file_(std::move(file)), uma_logger_(uma_logger) {}
virtual ~ChromiumRandomAccessFile() {}
Status Read(uint64_t offset,
@@ -766,7 +768,7 @@ Status ChromiumEnv::LockFile(const std::string& fname, FileLock** lock) {
}
ChromiumFileLock* my_lock = new ChromiumFileLock;
- my_lock->file_ = file.Pass();
+ my_lock->file_ = std::move(file);
my_lock->name_ = fname;
*lock = my_lock;
return result;
@@ -851,7 +853,7 @@ Status ChromiumEnv::NewRandomAccessFile(const std::string& fname,
int flags = base::File::FLAG_READ | base::File::FLAG_OPEN;
base::File file(FilePath::FromUTF8Unsafe(fname), flags);
if (file.IsValid()) {
- *result = new ChromiumRandomAccessFile(fname, file.Pass(), this);
+ *result = new ChromiumRandomAccessFile(fname, std::move(file), this);
RecordOpenFilesLimit("Success");
return Status::OK();
}
« no previous file with comments | « sql/recovery_unittest.cc ('k') | third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698