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

Unified Diff: base/files/important_file_writer.h

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | base/files/important_file_writer.cc » ('j') | chrome/browser/profiles/profile_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/important_file_writer.h
diff --git a/base/files/important_file_writer.h b/base/files/important_file_writer.h
index 290813ce975bdef6ab975c77ae74b207d420c862..ae814d5e1b36fc99e703e05405a94363fc13984e 100644
--- a/base/files/important_file_writer.h
+++ b/base/files/important_file_writer.h
@@ -17,7 +17,7 @@
namespace base {
-class MessageLoopProxy;
+class SequencedTaskRunner;
class Thread;
// Helper to ensure that a file won't be corrupted by the write (for example on
@@ -53,11 +53,11 @@ class BASE_EXPORT ImportantFileWriter : public 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,
- MessageLoopProxy* file_message_loop_proxy);
+ base::SequencedTaskRunner* task_runner);
// You have to ensure that there are no pending writes at the moment
// of destruction.
@@ -96,8 +96,8 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
// Path being written to.
const FilePath path_;
- // MessageLoopProxy for the thread on which file I/O can be done.
- scoped_refptr<MessageLoopProxy> file_message_loop_proxy_;
+ // TaskRunner for the thread on which file I/O can be done.
+ const scoped_refptr<base::SequencedTaskRunner> task_runner_;
// Timer used to schedule commit after ScheduleWrite.
OneShotTimer<ImportantFileWriter> timer_;
« no previous file with comments | « no previous file | base/files/important_file_writer.cc » ('j') | chrome/browser/profiles/profile_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698