Index: webkit/fileapi/file_system_context.h |
diff --git a/webkit/fileapi/file_system_context.h b/webkit/fileapi/file_system_context.h |
index d72a3ca745fdef0a1e2b6d2d962bbeca866482a3..59a5a4b7b1adfe6f00c6537eeecad122e1f797da 100644 |
--- a/webkit/fileapi/file_system_context.h |
+++ b/webkit/fileapi/file_system_context.h |
@@ -18,7 +18,8 @@ class FilePath; |
class GURL; |
namespace base { |
-class MessageLoopProxy; |
+class SingleThreadTaskRunner; |
+class SequencedTaskRunner; |
michaeln
2012/04/27 22:31:08
nit(picky-nit): alpha ordering
kinuko
2012/05/04 19:05:35
Done.
|
} |
namespace quota { |
@@ -49,10 +50,15 @@ class FileSystemContext |
: public base::RefCountedThreadSafe<FileSystemContext, |
DefaultContextDeleter> { |
public: |
+ // |file_task_runner| is used for all file operations and file related |
+ // meta operations. |
+ // The code assumes that file_task_runner->RunsTasksOnCurrentThread() returns |
+ // false if the current task is not running on the thread that allows |
michaeln
2012/04/27 22:31:08
fyi: the semantics/implemetation of RunsTasksOnCur
kinuko
2012/05/04 19:05:35
Yes, I had read this comment and how they are impl
|
+ // blocking file operations (like SequencedWorkerPool implementation does). |
FileSystemContext( |
- scoped_refptr<base::MessageLoopProxy> file_message_loop, |
- scoped_refptr<base::MessageLoopProxy> io_message_loop, |
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, |
+ base::SequencedTaskRunner* file_task_runner, |
+ base::SingleThreadTaskRunner* io_task_runner, |
+ quota::SpecialStoragePolicy* special_storage_policy, |
quota::QuotaManagerProxy* quota_manager_proxy, |
const FilePath& profile_path, |
const FileSystemOptions& options); |
@@ -114,9 +120,7 @@ class FileSystemContext |
// and calling the provider's corresponding CreateFileSystemOperation method. |
// The resolved MountPointProvider could perform further specialization |
// depending on the filesystem type pointed by the |url|. |
- FileSystemOperationInterface* CreateFileSystemOperation( |
- const GURL& url, |
- base::MessageLoopProxy* file_proxy); |
+ FileSystemOperationInterface* CreateFileSystemOperation(const GURL& url); |
// Creates new FileReader instance to read a file pointed by the given |
// filesystem URL |url| starting from |offset|. |
@@ -126,15 +130,14 @@ class FileSystemContext |
// depending on the filesystem type pointed by the |url|. |
webkit_blob::FileReader* CreateFileReader( |
const GURL& url, |
- int64 offset, |
- base::MessageLoopProxy* file_proxy); |
+ int64 offset); |
private: |
friend struct DefaultContextDeleter; |
void DeleteOnCorrectThread() const; |
- scoped_refptr<base::MessageLoopProxy> file_message_loop_; |
- scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |