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

Unified Diff: ui/base/resource/data_pack.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (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 | « ui/base/models/list_model.h ('k') | ui/base/resource/data_pack_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/data_pack.cc
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc
index 09d73d79c59ea0b5db9ab3d44ee4843d44a351af..090989d5f44a10b03de3bae1931c1405500fd264 100644
--- a/ui/base/resource/data_pack.cc
+++ b/ui/base/resource/data_pack.cc
@@ -5,6 +5,7 @@
#include "ui/base/resource/data_pack.h"
#include <errno.h>
+#include <utility>
#include "base/files/file_util.h"
#include "base/files/memory_mapped_file.h"
@@ -86,7 +87,7 @@ bool DataPack::LoadFromPath(const base::FilePath& path) {
}
bool DataPack::LoadFromFile(base::File file) {
- return LoadFromFileRegion(file.Pass(),
+ return LoadFromFileRegion(std::move(file),
base::MemoryMappedFile::Region::kWholeFile);
}
@@ -94,7 +95,7 @@ bool DataPack::LoadFromFileRegion(
base::File file,
const base::MemoryMappedFile::Region& region) {
mmap_.reset(new base::MemoryMappedFile);
- if (!mmap_->Initialize(file.Pass(), region)) {
+ if (!mmap_->Initialize(std::move(file), region)) {
DLOG(ERROR) << "Failed to mmap datapack";
UMA_HISTOGRAM_ENUMERATION("DataPack.Load", INIT_FAILED_FROM_FILE,
LOAD_ERRORS_COUNT);
« no previous file with comments | « ui/base/models/list_model.h ('k') | ui/base/resource/data_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698