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

Unified Diff: webkit/fileapi/file_system_operation_context.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
Index: webkit/fileapi/file_system_operation_context.h
diff --git a/webkit/fileapi/file_system_operation_context.h b/webkit/fileapi/file_system_operation_context.h
index 3a8cc3931b0c2afbf6e3026b1a76d433ab554ac2..ae044a0aa828f3740bf4f614fbd391301a0ba39b 100644
--- a/webkit/fileapi/file_system_operation_context.h
+++ b/webkit/fileapi/file_system_operation_context.h
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner.h"
#include "googleurl/src/gurl.h"
#include "webkit/fileapi/fileapi_export.h"
#include "webkit/fileapi/file_system_context.h"
@@ -18,10 +19,6 @@
#include "webkit/fileapi/media/media_device_interface_impl.h"
#endif
-namespace base {
-class SequencedTaskRunner;
-}
-
namespace fileapi {
class MediaPathFilter;
@@ -50,7 +47,14 @@ class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext {
}
#endif
- base::SequencedTaskRunner* file_task_runner() const;
+ // Returns TaskRunner which the operation is performed on.
+ base::SequencedTaskRunner* task_runner() const {
+ return task_runner_.get();
+ }
+
+ // Overrides TaskRunner which the operation is performed on.
+ // file_system_context_->task_runners()->file_task_runner() is used otherwise.
+ void set_task_runner(base::SequencedTaskRunner* task_runner);
void set_media_path_filter(MediaPathFilter* media_path_filter) {
media_path_filter_ = media_path_filter;
@@ -62,6 +66,7 @@ class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext {
private:
scoped_refptr<FileSystemContext> file_system_context_;
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
int64 allowed_bytes_growth_;
MediaPathFilter* media_path_filter_;
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider_unittest.cc ('k') | webkit/fileapi/file_system_operation_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698