Index: chrome/browser/net/file_downloader.cc |
diff --git a/chrome/browser/net/file_downloader.cc b/chrome/browser/net/file_downloader.cc |
index ffbb4f96680d0740295fe45f3f16c8f93ff18e63..f8f3f792d8fa597dfe1e517d8197dca738985274 100644 |
--- a/chrome/browser/net/file_downloader.cc |
+++ b/chrome/browser/net/file_downloader.cc |
@@ -8,7 +8,7 @@ |
#include "base/files/file_path.h" |
#include "base/files/file_util.h" |
#include "base/logging.h" |
-#include "base/threading/sequenced_worker_pool.h" |
+#include "base/task_scheduler/post_task.h" |
#include "content/public/browser/browser_thread.h" |
#include "net/base/load_flags.h" |
#include "net/http/http_status_code.h" |
@@ -43,9 +43,12 @@ FileDownloader::FileDownloader( |
fetcher_->Start(); |
} else { |
base::PostTaskAndReplyWithResult( |
- BrowserThread::GetBlockingPool() |
- ->GetTaskRunnerWithShutdownBehavior( |
- base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN) |
+ base::CreateTaskRunnerWithTraits( |
+ base::TaskTraits() |
+ .MayBlock() |
+ .WithPriority(base::TaskPriority::BACKGROUND) |
+ .WithShutdownBehavior( |
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)) |
.get(), |
FROM_HERE, base::Bind(&base::PathExists, local_path_), |
base::Bind(&FileDownloader::OnFileExistsCheckDone, |
@@ -82,9 +85,12 @@ void FileDownloader::OnURLFetchComplete(const net::URLFetcher* source) { |
} |
base::PostTaskAndReplyWithResult( |
- BrowserThread::GetBlockingPool() |
- ->GetTaskRunnerWithShutdownBehavior( |
- base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN) |
+ base::CreateTaskRunnerWithTraits( |
+ base::TaskTraits() |
+ .MayBlock() |
+ .WithPriority(base::TaskPriority::BACKGROUND) |
+ .WithShutdownBehavior( |
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)) |
.get(), |
FROM_HERE, base::Bind(&base::Move, response_path, local_path_), |
base::Bind(&FileDownloader::OnFileMoveDone, |