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

Unified Diff: chrome/browser/file_select_helper.cc

Issue 2545723005: Use TaskScheduler instead of WorkerPool in file_select_helper.cc. (Closed)
Patch Set: may block Created 4 years 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: chrome/browser/file_select_helper.cc
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index 0dec597754601110936646b820112a339b69a2f8..1e3e01e3fa3a4b22ae145d308c6917afd98a1b49 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -16,7 +16,7 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/platform_util.h"
@@ -250,7 +250,13 @@ void FileSelectHelper::StartNewEnumeration(const base::FilePath& path,
entry->delegate_.reset(new DirectoryListerDispatchDelegate(this, request_id));
entry->lister_.reset(new net::DirectoryLister(
path, net::DirectoryLister::NO_SORT_RECURSIVE, entry->delegate_.get()));
- if (!entry->lister_->Start(base::WorkerPool::GetTaskRunner(true).get())) {
+ if (!entry->lister_->Start(
+ base::CreateTaskRunnerWithTraits(
+ base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .MayBlock())
+ .get())) {
if (request_id == kFileSelectEnumerationId)
FileSelectionCanceled(NULL);
else
« 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