diff options
Diffstat (limited to 'base/files')
-rw-r--r-- | base/files/file_path_watcher.h | 5 | ||||
-rw-r--r-- | base/files/important_file_writer.cc | 4 | ||||
-rw-r--r-- | base/files/memory_mapped_file_unittest.cc | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h index 4f132af..834acbc 100644 --- a/base/files/file_path_watcher.h +++ b/base/files/file_path_watcher.h @@ -62,9 +62,8 @@ class BASE_EXPORT FilePathWatcher { return task_runner_; } - void set_task_runner( - scoped_refptr<base::SingleThreadTaskRunner> task_runner) { - task_runner_ = task_runner.Pass(); + void set_task_runner(scoped_refptr<base::SingleThreadTaskRunner> runner) { + task_runner_ = std::move(runner); } // Must be called before the PlatformDelegate is deleted. diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc index 1529107..4af7137 100644 --- a/base/files/important_file_writer.cc +++ b/base/files/important_file_writer.cc @@ -5,8 +5,8 @@ #include "base/files/important_file_writer.h" #include <stdio.h> - #include <string> +#include <utility> #include "base/bind.h" #include "base/critical_closure.h" @@ -191,7 +191,7 @@ void ImportantFileWriter::DoScheduledWrite() { DCHECK(serializer_); scoped_ptr<std::string> data(new std::string); if (serializer_->SerializeData(data.get())) { - WriteNow(data.Pass()); + WriteNow(std::move(data)); } else { DLOG(WARNING) << "failed to serialize data to be saved in " << path_.value(); diff --git a/base/files/memory_mapped_file_unittest.cc b/base/files/memory_mapped_file_unittest.cc index 05b941c..1812d88 100644 --- a/base/files/memory_mapped_file_unittest.cc +++ b/base/files/memory_mapped_file_unittest.cc @@ -18,7 +18,7 @@ scoped_ptr<uint8[]> CreateTestBuffer(size_t size, size_t offset) { scoped_ptr<uint8[]> buf(new uint8[size]); for (size_t i = 0; i < size; ++i) buf.get()[i] = static_cast<uint8>((offset + i) % 253); - return buf.Pass(); + return buf; } // Check that the watermark sequence is consistent with the |offset| provided. |