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

Unified Diff: webkit/fileapi/file_system_context.h

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 years, 8 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: webkit/fileapi/file_system_context.h
diff --git a/webkit/fileapi/file_system_context.h b/webkit/fileapi/file_system_context.h
index d72a3ca745fdef0a1e2b6d2d962bbeca866482a3..7351b61f49334e0c5f39901398694740f0c462a6 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 TaskRunner;
}
namespace quota {
@@ -49,10 +50,13 @@ class FileSystemContext
: public base::RefCountedThreadSafe<FileSystemContext,
DefaultContextDeleter> {
public:
+ // Given |file_task_runner| may be used for internal initialization and
+ // finalization by mount point providers.
+ // |io_task_runner| is used only for the final destruction.
FileSystemContext(
- scoped_refptr<base::MessageLoopProxy> file_message_loop,
- scoped_refptr<base::MessageLoopProxy> io_message_loop,
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy,
+ base::SingleThreadTaskRunner* file_task_runner,
michaeln 2012/04/27 01:04:03 If the intent is to eventually put these tasks on
kinuko 2012/04/27 10:10:29 I wanted to do so but couldn't find the nice RunsT
+ base::SingleThreadTaskRunner* io_task_runner,
+ quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
const FilePath& profile_path,
const FileSystemOptions& options);
@@ -116,7 +120,7 @@ class FileSystemContext
// depending on the filesystem type pointed by the |url|.
FileSystemOperationInterface* CreateFileSystemOperation(
const GURL& url,
- base::MessageLoopProxy* file_proxy);
+ base::TaskRunner* file_task_runner);
michaeln 2012/04/27 01:04:03 Since an operation may involve multiple steps, wou
kinuko 2012/04/27 10:10:29 Done. (Removed this parameter in favor of using t
// Creates new FileReader instance to read a file pointed by the given
// filesystem URL |url| starting from |offset|.
@@ -127,14 +131,14 @@ class FileSystemContext
webkit_blob::FileReader* CreateFileReader(
const GURL& url,
int64 offset,
- base::MessageLoopProxy* file_proxy);
+ base::TaskRunner* file_task_runner);
michaeln 2012/04/27 01:04:03 ditto
kinuko 2012/04/27 10:10:29 Done.
private:
friend struct DefaultContextDeleter;
void DeleteOnCorrectThread() const;
- scoped_refptr<base::MessageLoopProxy> file_message_loop_;
- scoped_refptr<base::MessageLoopProxy> io_message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;

Powered by Google App Engine
This is Rietveld 408576698