Commit 787749ba authored by fdoray's avatar fdoray Committed by Commit bot

Use TaskScheduler instead of blocking pool in clipboard_message_filter.cc.

The blocking pool is being deprecated in favor of TaskScheduler.

BUG=667892
R=sadrul@chromium.org

Review-Url: https://codereview.chromium.org/2839793002
Cr-Commit-Position: refs/heads/master@{#467317}
parent 484fd1ba
......@@ -12,7 +12,7 @@
#include "base/macros.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
......@@ -180,12 +180,14 @@ void ClipboardMessageFilter::OnReadImage(ui::ClipboardType type,
IPC::Message* reply_msg) {
SkBitmap bitmap = GetClipboard()->ReadImage(type);
BrowserThread::GetBlockingPool()
->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)
->PostTask(FROM_HERE,
base::Bind(&ClipboardMessageFilter::ReadAndEncodeImage, this,
bitmap, reply_msg));
base::PostTaskWithTraits(
FROM_HERE,
base::TaskTraits()
.MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN),
base::BindOnce(&ClipboardMessageFilter::ReadAndEncodeImage, this, bitmap,
reply_msg));
}
void ClipboardMessageFilter::ReadAndEncodeImage(const SkBitmap& bitmap,
......
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