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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "webkit/fileapi/fileapi_export.h"
11
12 namespace base {
13 class SequencedTaskRunner;
14 class SingleThreadTaskRunner;
15 } // namespace
16
17 namespace fileapi {
18
19 // This class holds task runners used for filesystem related stuff.
20 class FILEAPI_EXPORT FileSystemTaskRunners {
21 public:
22 FileSystemTaskRunners(
23 base::SingleThreadTaskRunner* io_task_runner,
24 base::SingleThreadTaskRunner* file_task_runner,
25 base::SequencedTaskRunner* media_task_runner);
26
27 ~FileSystemTaskRunners();
28
29 static scoped_ptr<FileSystemTaskRunners> CreateMockTaskRunners();
30
31 base::SingleThreadTaskRunner* io_task_runner() {
32 return io_task_runner_.get();
33 }
34
35 base::SingleThreadTaskRunner* file_task_runner() {
36 return file_task_runner_.get();
37 }
38
39 base::SequencedTaskRunner* media_task_runner() {
40 return media_task_runner_.get();
41 }
42
43 private:
44 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
45 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
46 scoped_refptr<base::SequencedTaskRunner> media_task_runner_;
47
48 DISALLOW_COPY_AND_ASSIGN(FileSystemTaskRunners);
49 };
50
51 } // namespace fileapi
52
53 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_
OLDNEW
« 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