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

Unified Diff: device/serial/data_sink_receiver.cc

Issue 2031743005: Remove use of deprecated MessageLoop methods in device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « device/serial/data_sender.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_sink_receiver.cc
diff --git a/device/serial/data_sink_receiver.cc b/device/serial/data_sink_receiver.cc
index f06816f7df68c2f6cb8c45516cd3061b4caba2cd..1352829a85b7cc946202512f5bdd26bd7995a102 100644
--- a/device/serial/data_sink_receiver.cc
+++ b/device/serial/data_sink_receiver.cc
@@ -9,7 +9,9 @@
#include <utility>
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
namespace device {
@@ -154,10 +156,9 @@ void DataSinkReceiver::Done(uint32_t bytes_read) {
if (pending_data_buffers_.front()->GetRemainingBytes() == 0)
pending_data_buffers_.pop();
if (!pending_data_buffers_.empty()) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&DataSinkReceiver::RunReadyCallback,
- weak_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&DataSinkReceiver::RunReadyCallback,
+ weak_factory_.GetWeakPtr()));
}
}
« no previous file with comments | « device/serial/data_sender.cc ('k') | device/serial/data_source_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698