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

Unified Diff: chromeos/dbus/fake_permission_broker_client.cc

Issue 2601423002: Use TaskScheduler instead of WorkerPool in fake_permission_broker_client.cc. (Closed)
Patch Set: fix build error Created 3 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_permission_broker_client.cc
diff --git a/chromeos/dbus/fake_permission_broker_client.cc b/chromeos/dbus/fake_permission_broker_client.cc
index f3b1e4be369fb047d9a6b1d41c17368ae999e244..98b242de2286a42aafd5528747ed12db36d311ef 100644
--- a/chromeos/dbus/fake_permission_broker_client.cc
+++ b/chromeos/dbus/fake_permission_broker_client.cc
@@ -13,8 +13,8 @@
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/stringprintf.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
namespace chromeos {
@@ -62,10 +62,13 @@ void FakePermissionBrokerClient::CheckPathAccess(
void FakePermissionBrokerClient::OpenPath(const std::string& path,
const OpenPathCallback& callback,
const ErrorCallback& error_callback) {
- base::WorkerPool::PostTask(
- FROM_HERE, base::Bind(&chromeos::OpenPath, path, callback, error_callback,
- base::ThreadTaskRunnerHandle::Get()),
- false);
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .MayBlock(),
+ base::Bind(&chromeos::OpenPath, path, callback, error_callback,
+ base::ThreadTaskRunnerHandle::Get()));
}
void FakePermissionBrokerClient::RequestTcpPortAccess(
« 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