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

Unified Diff: content/browser/blob_storage/chrome_blob_storage_context.cc

Issue 2836813005: Use TaskScheduler instead of blocking pool in chrome_blob_storage_context.cc. (Closed)
Patch Set: Created 3 years, 8 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/blob_storage/chrome_blob_storage_context.cc
diff --git a/content/browser/blob_storage/chrome_blob_storage_context.cc b/content/browser/blob_storage/chrome_blob_storage_context.cc
index 8e3a3d831c9926f6b88f76eeaea240ae9a3ed340..38bfcc72f12a17f284f26488ec313a0d76d3bd51 100644
--- a/content/browser/blob_storage/chrome_blob_storage_context.cc
+++ b/content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -14,7 +14,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
-#include "base/threading/sequenced_worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "content/browser/resource_context_impl.h"
#include "content/common/resource_request_body_impl.h"
#include "content/public/browser/blob_handle.h"
@@ -100,9 +100,12 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
// If we're not incognito mode, schedule all of our file tasks to enable
// disk on the storage context.
if (!context->IsOffTheRecord() && io_thread_valid) {
- file_task_runner =
- BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
+ file_task_runner = base::CreateTaskRunnerWithTraits(
+ base::TaskTraits()
+ .MayBlock()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN));
// Removes our old blob directories if they exist.
BrowserThread::PostAfterStartupTask(
FROM_HERE, file_task_runner,
« 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