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

Unified Diff: content/browser/fileapi/browser_file_system_helper.cc

Issue 2969293003: Revert of Remove SequencedWorkerPool::GetNamedSequenceToken from content::CreateFileSystemContext. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/browser_file_system_helper.cc
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc
index 9fef5be45db124092bf39ee8a39e0d86e72e8a85..f8da5a6ad26f684a8592e39cfae1dc7ddd741780 100644
--- a/content/browser/fileapi/browser_file_system_helper.cc
+++ b/content/browser/fileapi/browser_file_system_helper.cc
@@ -13,7 +13,7 @@
#include "base/files/file_path.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -63,6 +63,12 @@
const base::FilePath& profile_path,
bool is_incognito,
storage::QuotaManagerProxy* quota_manager_proxy) {
+ base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner =
+ pool->GetSequencedTaskRunnerWithShutdownBehavior(
+ pool->GetNamedSequenceToken("FileAPI"),
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
+
// Setting up additional filesystem backends.
std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends;
GetContentClient()->browser()->GetAdditionalFileSystemBackends(
@@ -79,10 +85,7 @@
scoped_refptr<storage::FileSystemContext> file_system_context =
new storage::FileSystemContext(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(),
- base::CreateSequencedTaskRunnerWithTraits(
- {base::MayBlock(), base::TaskPriority::BACKGROUND,
- base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})
- .get(),
+ file_task_runner.get(),
BrowserContext::GetMountPoints(browser_context),
browser_context->GetSpecialStoragePolicy(), quota_manager_proxy,
std::move(additional_backends), url_request_auto_mount_handlers,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698