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

Unified Diff: webkit/fileapi/file_system_task_runners.h

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix for windows Created 8 years, 4 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
« no previous file with comments | « webkit/fileapi/file_system_quota_client_unittest.cc ('k') | webkit/fileapi/file_system_task_runners.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_task_runners.h
diff --git a/webkit/fileapi/file_system_task_runners.h b/webkit/fileapi/file_system_task_runners.h
new file mode 100644
index 0000000000000000000000000000000000000000..219e2af621ba841b4ef4ba5cb8166de4c3abf7ce
--- /dev/null
+++ b/webkit/fileapi/file_system_task_runners.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
+#define WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "webkit/fileapi/fileapi_export.h"
+
+namespace base {
+class SequencedTaskRunner;
+class SingleThreadTaskRunner;
+} // namespace
+
+namespace fileapi {
+
+// This class holds task runners used for filesystem related stuff.
+class FILEAPI_EXPORT FileSystemTaskRunners {
+ public:
+ FileSystemTaskRunners(
+ base::SingleThreadTaskRunner* io_task_runner,
+ base::SingleThreadTaskRunner* file_task_runner,
+ base::SequencedTaskRunner* media_task_runner);
+
+ ~FileSystemTaskRunners();
+
+ static scoped_ptr<FileSystemTaskRunners> CreateMockTaskRunners();
+
+ base::SingleThreadTaskRunner* io_task_runner() {
+ return io_task_runner_.get();
+ }
+
+ base::SingleThreadTaskRunner* file_task_runner() {
+ return file_task_runner_.get();
+ }
+
+ base::SequencedTaskRunner* media_task_runner() {
+ return media_task_runner_.get();
+ }
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
+ scoped_refptr<base::SequencedTaskRunner> media_task_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileSystemTaskRunners);
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
« no previous file with comments | « webkit/fileapi/file_system_quota_client_unittest.cc ('k') | webkit/fileapi/file_system_task_runners.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698