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

Unified Diff: device/serial/serial_service_impl.cc

Issue 1107013002: [device] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Review Comments : Removal of message_loop_proxy header file Created 5 years, 8 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/serial_service_impl.h ('k') | device/serial/serial_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_service_impl.cc
diff --git a/device/serial/serial_service_impl.cc b/device/serial/serial_service_impl.cc
index 5fc886df2eca241e338333ee682e8ae420656a41..22734c89c9273e03d760043623cd60e65222368d 100644
--- a/device/serial/serial_service_impl.cc
+++ b/device/serial/serial_service_impl.cc
@@ -27,28 +27,26 @@ SerialServiceImpl::~SerialServiceImpl() {
// static
void SerialServiceImpl::Create(
- scoped_refptr<base::MessageLoopProxy> io_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_message_loop,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
mojo::InterfaceRequest<serial::SerialService> request) {
- mojo::BindToRequest(new SerialServiceImpl(new SerialConnectionFactory(
- base::Bind(SerialIoHandler::Create,
- base::MessageLoopProxy::current(),
- ui_message_loop),
- io_message_loop)),
- &request);
+ mojo::BindToRequest(
+ new SerialServiceImpl(new SerialConnectionFactory(
+ base::Bind(SerialIoHandler::Create,
+ base::ThreadTaskRunnerHandle::Get(), ui_task_runner),
+ io_task_runner)),
+ &request);
}
// static
void SerialServiceImpl::CreateOnMessageLoop(
- scoped_refptr<base::MessageLoopProxy> message_loop,
- scoped_refptr<base::MessageLoopProxy> io_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_message_loop,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
mojo::InterfaceRequest<serial::SerialService> request) {
- message_loop->PostTask(FROM_HERE,
- base::Bind(&SerialServiceImpl::Create,
- io_message_loop,
- ui_message_loop,
- base::Passed(&request)));
+ task_runner->PostTask(FROM_HERE,
+ base::Bind(&SerialServiceImpl::Create, io_task_runner,
+ ui_task_runner, base::Passed(&request)));
}
void SerialServiceImpl::GetDevices(
« no previous file with comments | « device/serial/serial_service_impl.h ('k') | device/serial/serial_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698