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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

Issue 2547173002: Use TaskScheduler instead of WorkerPool in debug_daemon_client.cc. (Closed)
Patch Set: 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: chromeos/dbus/debug_daemon_client.cc
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index eda3a100ede97314e16a0d77c11ca75f9b47999b..9ec3104879f412e546d1b5aa23950fcee9be98ac 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -22,9 +22,8 @@
#include "base/message_loop/message_loop.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_util.h"
-#include "base/task_runner_util.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "chromeos/dbus/pipe_reader.h"
#include "dbus/bus.h"
#include "dbus/message.h"
@@ -55,9 +54,9 @@ void EmptyStopAgentTracingCallbackBody(
class PipeReaderWrapper : public base::SupportsWeakPtr<PipeReaderWrapper> {
public:
explicit PipeReaderWrapper(const DebugDaemonClient::GetLogsCallback& callback)
- : task_runner_(
- base::WorkerPool::GetTaskRunner(true /** tasks_are_slow */)),
- pipe_reader_(task_runner_,
+ : pipe_reader_(base::CreateTaskRunnerWithTraits(
+ base::TaskTraits().WithFileIO().WithShutdownBehavior(
hashimoto 2016/12/09 10:54:37 This task runner is used not to read a file, but t
fdoray 2016/12/09 16:49:14 The WithFileIO() trait is appropriate for tasks th
hashimoto 2016/12/10 01:13:55 Thanks, improved comments would be appreciated. E
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)),
hashimoto 2016/12/09 10:54:37 PipeReader uses the task runner to provide it to n
fdoray 2016/12/09 16:49:14 WorkerPool tasks are handled the same way as TaskS
base::Bind(&PipeReaderWrapper::OnIOComplete, AsWeakPtr())),
callback_(callback) {}
« 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