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

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

Issue 2883403002: Remove usage of SequencedWorkerPool::GetNamedSequenceToken from content::CreateFileSystemContext. (Closed)
Patch Set: Created 3 years, 7 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 f8da5a6ad26f684a8592e39cfae1dc7ddd741780..9fef5be45db124092bf39ee8a39e0d86e72e8a85 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/threading/sequenced_worker_pool.h"
+#include "base/task_scheduler/post_task.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,12 +63,6 @@ scoped_refptr<storage::FileSystemContext> CreateFileSystemContext(
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"),
fdoray 2017/05/17 14:38:49 Mutual exclusion is guaranteed between tasks poste
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
-
// Setting up additional filesystem backends.
std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends;
GetContentClient()->browser()->GetAdditionalFileSystemBackends(
@@ -85,7 +79,10 @@ scoped_refptr<storage::FileSystemContext> CreateFileSystemContext(
scoped_refptr<storage::FileSystemContext> file_system_context =
new storage::FileSystemContext(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(),
- file_task_runner.get(),
+ base::CreateSequencedTaskRunnerWithTraits(
+ {base::MayBlock(), base::TaskPriority::BACKGROUND,
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})
+ .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