| OLD | NEW |
| (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_BROWSER_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_ | |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "webkit/browser/webkit_storage_browser_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 WEBKIT_STORAGE_BROWSER_EXPORT FileSystemTaskRunners { | |
| 21 public: | |
| 22 FileSystemTaskRunners( | |
| 23 base::SingleThreadTaskRunner* io_task_runner, | |
| 24 base::SequencedTaskRunner* file_task_runner); | |
| 25 | |
| 26 ~FileSystemTaskRunners(); | |
| 27 | |
| 28 static scoped_ptr<FileSystemTaskRunners> CreateMockTaskRunners(); | |
| 29 | |
| 30 base::SingleThreadTaskRunner* io_task_runner() { | |
| 31 return io_task_runner_.get(); | |
| 32 } | |
| 33 | |
| 34 base::SequencedTaskRunner* file_task_runner() { | |
| 35 return file_task_runner_.get(); | |
| 36 } | |
| 37 | |
| 38 private: | |
| 39 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | |
| 40 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(FileSystemTaskRunners); | |
| 43 }; | |
| 44 | |
| 45 } // namespace fileapi | |
| 46 | |
| 47 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_TASK_RUNNERS_H_ | |
| OLD | NEW |