Index: base/files/important_file_writer.cc |
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc |
index b46846277b0bbde35d6196b39a6f16a33045b560..c307993ee6249fc7a87c27d7be41cbfd974f3373 100644 |
--- a/base/files/important_file_writer.cc |
+++ b/base/files/important_file_writer.cc |
@@ -11,6 +11,7 @@ |
#include <utility> |
#include "base/bind.h" |
+#include "base/callback_helpers.h" |
#include "base/critical_closure.h" |
#include "base/debug/alias.h" |
#include "base/files/file.h" |
@@ -178,9 +179,10 @@ void ImportantFileWriter::WriteNow(std::unique_ptr<std::string> data) { |
if (HasPendingWrite()) |
timer_.Stop(); |
- Closure task = Bind(&WriteScopedStringToFileAtomically, path_, Passed(&data), |
- Passed(&before_next_write_callback_), |
- Passed(&after_next_write_callback_)); |
+ Closure task = IgnoreReuse(BindOnce(&WriteScopedStringToFileAtomically, path_, |
+ std::move(data), |
+ std::move(before_next_write_callback_), |
+ std::move(after_next_write_callback_))); |
if (!task_runner_->PostTask(FROM_HERE, MakeCriticalClosure(task))) { |
// Posting the task to background message loop is not expected |