Index: chrome/browser/extensions/api/file_system/file_system_api.h |
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h |
index 740c44706c185d021514b170b0a882f33a68cc4e..7c5a99d724eca80872502b5089a0ea84f10dba66 100644 |
--- a/chrome/browser/extensions/api/file_system/file_system_api.h |
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h |
@@ -13,6 +13,7 @@ |
#include "base/files/file_path.h" |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/task_scheduler/post_task.h" |
#include "base/values.h" |
#include "build/build_config.h" |
#include "chrome/browser/extensions/chrome_extension_function.h" |
@@ -157,7 +158,7 @@ class FileSystemEntryFunction : public ChromeAsyncExtensionFunction { |
protected: |
FileSystemEntryFunction(); |
- ~FileSystemEntryFunction() override {} |
+ ~FileSystemEntryFunction() override; |
// This is called when writable file entries are being returned. The function |
// will ensure the files exist, creating them if necessary, and also check |
@@ -187,6 +188,11 @@ class FileSystemEntryFunction : public ChromeAsyncExtensionFunction { |
// Whether a directory has been requested. |
bool is_directory_; |
+ |
+ // The task runner used to do file operations. |
+ const scoped_refptr<base::SequencedTaskRunner> task_runner_ = |
+ base::CreateSequencedTaskRunnerWithTraits( |
+ {base::MayBlock(), base::TaskPriority::BACKGROUND}); |
}; |
class FileSystemGetWritableEntryFunction : public FileSystemEntryFunction { |