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

Unified Diff: chrome/common/important_file_writer.h

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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: chrome/common/important_file_writer.h
diff --git a/chrome/common/important_file_writer.h b/chrome/common/important_file_writer.h
index 5bd5deff44bac68c517da7f62495508aa5b10844..bb8847880f813a91be1c484a66e4a81a00c97b4b 100644
--- a/chrome/common/important_file_writer.h
+++ b/chrome/common/important_file_writer.h
@@ -15,7 +15,7 @@
#include "base/timer.h"
namespace base {
-class MessageLoopProxy;
+class SequencedTaskRunner;
class Thread;
}
@@ -52,11 +52,11 @@ class ImportantFileWriter : public base::NonThreadSafe {
// Initialize the writer.
// |path| is the name of file to write.
- // |file_message_loop_proxy| is the MessageLoopProxy for a thread on which
- // file I/O can be done.
+ // |task_runner| is the SequencedTaskRunner instance where on which we will
+ // execute file I/O operations.
// All non-const methods, ctor and dtor must be called on the same thread.
ImportantFileWriter(const FilePath& path,
- base::MessageLoopProxy* file_message_loop_proxy);
+ base::SequencedTaskRunner* task_runner);
// You have to ensure that there are no pending writes at the moment
// of destruction.
@@ -95,8 +95,8 @@ class ImportantFileWriter : public base::NonThreadSafe {
// Path being written to.
const FilePath path_;
- // MessageLoopProxy for the thread on which file I/O can be done.
- scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy_;
+ // TaskRunner for the thread on which file I/O can be done.
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
// Timer used to schedule commit after ScheduleWrite.
base::OneShotTimer<ImportantFileWriter> timer_;

Powered by Google App Engine
This is Rietveld 408576698