diff options
Diffstat (limited to 'base/files/important_file_writer.cc')
-rw-r--r-- | base/files/important_file_writer.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc index 536b0fb..5663bdd 100644 --- a/base/files/important_file_writer.cc +++ b/base/files/important_file_writer.cc @@ -13,7 +13,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/logging.h" -#include "base/task_runner.h" +#include "base/message_loop_proxy.h" #include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/threading/thread.h" @@ -90,14 +90,14 @@ void WriteToDiskTask(const FilePath& path, const std::string& data) { } // namespace ImportantFileWriter::ImportantFileWriter( - const FilePath& path, base::SequencedTaskRunner* task_runner) + const FilePath& path, MessageLoopProxy* file_message_loop_proxy) : path_(path), - task_runner_(task_runner), + file_message_loop_proxy_(file_message_loop_proxy), serializer_(NULL), commit_interval_(TimeDelta::FromMilliseconds( kDefaultCommitIntervalMs)) { DCHECK(CalledOnValidThread()); - DCHECK(task_runner_.get()); + DCHECK(file_message_loop_proxy_.get()); } ImportantFileWriter::~ImportantFileWriter() { @@ -122,8 +122,8 @@ void ImportantFileWriter::WriteNow(const std::string& data) { if (HasPendingWrite()) timer_.Stop(); - if (!task_runner_->PostTask(FROM_HERE, - MakeCriticalClosure(Bind(&WriteToDiskTask, path_, data)))) { + if (!file_message_loop_proxy_->PostTask( + FROM_HERE, MakeCriticalClosure(Bind(&WriteToDiskTask, path_, data)))) { // Posting the task to background message loop is not expected // to fail, but if it does, avoid losing data and just hit the disk // on the current thread. |