Commit 5ea7b0fa authored by fdoray's avatar fdoray Committed by Commit bot

Use TaskScheduler instead of blocking pool in device_commands_factory_chromeos.cc.

The blocking pool is being deprecated in favor of TaskScheduler.

BUG=667892
R=bartfab@chromium.org

Review-Url: https://codereview.chromium.org/2837083002
Cr-Commit-Position: refs/heads/master@{#467729}
parent a9e5023d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/threading/sequenced_worker_pool.h" #include "base/task_scheduler/post_task.h"
#include "chrome/browser/chromeos/policy/remote_commands/device_command_fetch_status_job.h" #include "chrome/browser/chromeos/policy/remote_commands/device_command_fetch_status_job.h"
#include "chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h" #include "chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h"
#include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h" #include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h"
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "components/policy/core/common/remote_commands/remote_command_job.h" #include "components/policy/core/common/remote_commands/remote_command_job.h"
#include "components/policy/proto/device_management_backend.pb.h" #include "components/policy/proto/device_management_backend.pb.h"
#include "content/public/browser/browser_thread.h"
namespace em = enterprise_management; namespace em = enterprise_management;
...@@ -37,9 +36,12 @@ DeviceCommandsFactoryChromeOS::BuildJobForType(em::RemoteCommand_Type type) { ...@@ -37,9 +36,12 @@ DeviceCommandsFactoryChromeOS::BuildJobForType(em::RemoteCommand_Type type) {
case em::RemoteCommand_Type_DEVICE_SCREENSHOT: case em::RemoteCommand_Type_DEVICE_SCREENSHOT:
return base::WrapUnique<RemoteCommandJob>( return base::WrapUnique<RemoteCommandJob>(
new DeviceCommandScreenshotJob(base::MakeUnique<ScreenshotDelegate>( new DeviceCommandScreenshotJob(base::MakeUnique<ScreenshotDelegate>(
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( base::CreateSequencedTaskRunnerWithTraits(
content::BrowserThread::GetBlockingPool() base::TaskTraits()
->GetSequenceToken())))); .MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))));
case em::RemoteCommand_Type_DEVICE_SET_VOLUME: case em::RemoteCommand_Type_DEVICE_SET_VOLUME:
return base::WrapUnique<RemoteCommandJob>( return base::WrapUnique<RemoteCommandJob>(
new DeviceCommandSetVolumeJob()); new DeviceCommandSetVolumeJob());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment