Chromium Code Reviews| Index: chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| index 1974d6abb78f694f5f2143e4af2324ba841eb322..04a75005dc8e5d5e36345d2a4b25c39eccc13658 100644 |
| --- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| +++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| @@ -13,7 +13,6 @@ |
| #include "base/logging.h" |
| #include "base/process/kill.h" |
| #include "base/task_scheduler/post_task.h" |
| -#include "base/threading/sequenced_worker_pool.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest.h" |
| #include "chrome/browser/extensions/api/messaging/native_process_launcher.h" |
| @@ -146,10 +145,11 @@ void NativeMessageProcessHost::OnHostProcessLaunched( |
| read_file_ = read_file.GetPlatformFile(); |
| #endif |
| - scoped_refptr<base::TaskRunner> task_runner( |
| - content::BrowserThread::GetBlockingPool()-> |
| - GetTaskRunnerWithShutdownBehavior( |
| - base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| + scoped_refptr<base::TaskRunner> task_runner(base::CreateTaskRunnerWithTraits( |
| + base::TaskTraits() |
| + .MayBlock() |
| + .WithPriority(base::TaskPriority::BACKGROUND) |
|
Devlin
2017/04/24 20:22:11
This task can spawn a new process, which seems lik
Sergey Ulanov
2017/04/24 21:24:17
Yes, this should be USER_VISIBLE. Depending on app
fdoray
2017/04/27 13:06:39
Done.
|
| + .WithShutdownBehavior(base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))); |
| read_stream_.reset(new net::FileStream(std::move(read_file), task_runner)); |
| write_stream_.reset(new net::FileStream(std::move(write_file), task_runner)); |