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

Unified Diff: base/files/important_file_writer.cc

Issue 1800743003: base: Remove some unnecessary const scoped_refptr<>&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: base/files/important_file_writer.cc
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc
index b4293053a69cf6a4af647ef39d5786b934e0b154..a724dc36ee86cea4b06d70aa70fc4829cba7fe93 100644
--- a/base/files/important_file_writer.cc
+++ b/base/files/important_file_writer.cc
@@ -126,19 +126,18 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
ImportantFileWriter::ImportantFileWriter(
const FilePath& path,
- const scoped_refptr<SequencedTaskRunner>& task_runner)
+ scoped_refptr<SequencedTaskRunner> task_runner)
: ImportantFileWriter(
- path,
- task_runner,
- TimeDelta::FromMilliseconds(kDefaultCommitIntervalMs)) {
-}
+ path,
+ std::move(task_runner),
+ TimeDelta::FromMilliseconds(kDefaultCommitIntervalMs)) {}
ImportantFileWriter::ImportantFileWriter(
const FilePath& path,
- const scoped_refptr<SequencedTaskRunner>& task_runner,
+ scoped_refptr<SequencedTaskRunner> task_runner,
TimeDelta interval)
: path_(path),
- task_runner_(task_runner),
+ task_runner_(std::move(task_runner)),
serializer_(nullptr),
commit_interval_(interval),
weak_factory_(this) {

Powered by Google App Engine
This is Rietveld 408576698