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

Unified Diff: chrome/browser/file_select_helper.cc

Issue 2682523002: Use TaskScheduler in directory_lister.cc. (Closed)
Patch Set: remove ScopedTaskScheduler from TokenBindingURLRequestTest Created 3 years, 10 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 | net/base/directory_lister.h » ('j') | 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 8dc8132a2affed270c7fe7ddf0eb5bd599d33f75..cc5da5514d64df4568e65b5ddb3d16bf80f95145 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -16,7 +16,6 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.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,21 +249,8 @@ 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::CreateTaskRunnerWithTraits(
- base::TaskTraits()
- .WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
- .MayBlock())
- .get())) {
- if (request_id == kFileSelectEnumerationId)
- FileSelectionCanceled(NULL);
- else
- render_view_host->DirectoryEnumerationFinished(request_id,
- entry->results_);
- } else {
- directory_enumerations_[request_id] = entry.release();
- }
+ entry->lister_->Start();
+ directory_enumerations_[request_id] = entry.release();
}
void FileSelectHelper::OnListFile(
« no previous file with comments | « no previous file | net/base/directory_lister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698