Mass-migrate users of base::ThreadPool() as a trait to base::ThreadPool:: API [a-c]
Split directories [a* - components] (%chrome + fuchsia) from
https://chromium-review.googlesource.com/c/chromium/src/+/2026350
as it had trouble landing in one go.
The following script was used to generate this CL (run on every C++
file in the codebase; processing .h before matching .cc/.mm):
https://bugs.chromium.org/p/chromium/issues/detail?id=1026641#c22
(intentionally ignores cleaning post_task.h for now).
[email protected]
Bug: 1026641
Change-Id: I611ee5abce6daf14f80fbbf41e1fc14b6a1411d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075097
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: François Doray <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#744724}
diff --git a/components/ui_devtools/agent_util.cc b/components/ui_devtools/agent_util.cc
index f1dda66..6334a217 100644
--- a/components/ui_devtools/agent_util.cc
+++ b/components/ui_devtools/agent_util.cc
@@ -11,6 +11,7 @@
#include "base/run_loop.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h"
+#include "base/task/thread_pool.h"
namespace ui_devtools {
@@ -37,9 +38,9 @@
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
bool return_value;
- base::PostTaskAndReplyWithResult(
+ base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE,
- {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE,
+ {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
base::BindOnce(&base::ReadFileToString, src_dir, source_code),
base::BindOnce(&OnSourceFile, run_loop.QuitClosure(), &return_value));