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

Unified Diff: chrome/browser/file_select_helper.cc

Issue 2679993002: Run FileSelectHelper::ProcessSelectedFilesMac in parallel in TaskScheduler. (Closed)
Patch Set: include 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 | chrome/browser/file_select_helper_mac.mm » ('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 cc5da5514d64df4568e65b5ddb3d16bf80f95145..91aa51e1411d34e09b7c3cecd23a8174cc2f082d 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -16,6 +16,7 @@
#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"
@@ -199,9 +200,9 @@ void FileSelectHelper::FileSelectedWithExtraInfo(
files.push_back(file);
#if defined(OS_MACOSX)
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE_USER_BLOCKING,
- FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(&FileSelectHelper::ProcessSelectedFilesMac, this, files));
#else
NotifyRenderFrameHostAndEnd(files);
@@ -227,9 +228,9 @@ void FileSelectHelper::MultiFilesSelectedWithExtraInfo(
profile_->set_last_selected_directory(path);
}
#if defined(OS_MACOSX)
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE_USER_BLOCKING,
- FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(&FileSelectHelper::ProcessSelectedFilesMac, this, files));
#else
NotifyRenderFrameHostAndEnd(files);
« no previous file with comments | « no previous file | chrome/browser/file_select_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698