diff options
author | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 03:50:10 +0000 |
---|---|---|
committer | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 03:50:10 +0000 |
commit | dc57ec8f32abfe97c712cffbfed17be1f6e5f1ac (patch) | |
tree | ff8971f5a4649c3229143a76598115fce1c2b4b3 /webkit/fileapi/file_system_operation_context.h | |
parent | 6bb275c2204bee6abb89b9a6fc363912e19977c4 (diff) | |
download | chromium_src-dc57ec8f32abfe97c712cffbfed17be1f6e5f1ac.zip chromium_src-dc57ec8f32abfe97c712cffbfed17be1f6e5f1ac.tar.gz chromium_src-dc57ec8f32abfe97c712cffbfed17be1f6e5f1ac.tar.bz2 |
Move {Native,Device}MediaFileUtil from FILE thread to SequencedWorkerPool to avoid it blocks other I/O.
BUG=139187
Review URL: https://chromiumcodereview.appspot.com/10829147
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation_context.h')
-rw-r--r-- | webkit/fileapi/file_system_operation_context.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/webkit/fileapi/file_system_operation_context.h b/webkit/fileapi/file_system_operation_context.h index 3a8cc39..ae044a0 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_; |