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

Unified Diff: device/serial/serial_io_handler_posix.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_io_handler_posix.h ('k') | device/serial/serial_io_handler_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler_posix.cc
diff --git a/device/serial/serial_io_handler_posix.cc b/device/serial/serial_io_handler_posix.cc
index 5b3b3351de95665b821a04822674d9760a676bcc..471b0b8191999d71dd811a56e2e399920b5fb798 100644
--- a/device/serial/serial_io_handler_posix.cc
+++ b/device/serial/serial_io_handler_posix.cc
@@ -129,16 +129,16 @@ namespace device {
// static
scoped_refptr<SerialIoHandler> SerialIoHandler::Create(
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop) {
- return new SerialIoHandlerPosix(file_thread_message_loop,
- ui_thread_message_loop);
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner) {
+ return new SerialIoHandlerPosix(file_thread_task_runner,
+ ui_thread_task_runner);
}
void SerialIoHandlerPosix::RequestAccess(
const std::string& port,
- scoped_refptr<base::MessageLoopProxy> file_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_message_loop) {
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
#if defined(OS_LINUX) && defined(OS_CHROMEOS)
if (base::SysInfo::IsRunningOnChromeOS()) {
chromeos::PermissionBrokerClient* client =
@@ -149,13 +149,11 @@ void SerialIoHandlerPosix::RequestAccess(
return;
}
// PermissionBrokerClient should be called on the UI thread.
- ui_message_loop->PostTask(
+ ui_task_runner->PostTask(
FROM_HERE,
base::Bind(
&chromeos::PermissionBrokerClient::RequestPathAccess,
- base::Unretained(client),
- port,
- -1,
+ base::Unretained(client), port, -1,
base::Bind(&SerialIoHandler::OnRequestAccessComplete, this, port)));
} else {
OnRequestAccessComplete(port, true /* success */);
@@ -279,9 +277,9 @@ bool SerialIoHandlerPosix::ConfigurePortImpl() {
}
SerialIoHandlerPosix::SerialIoHandlerPosix(
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop)
- : SerialIoHandler(file_thread_message_loop, ui_thread_message_loop),
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner)
+ : SerialIoHandler(file_thread_task_runner, ui_thread_task_runner),
is_watching_reads_(false),
is_watching_writes_(false) {
}
« no previous file with comments | « device/serial/serial_io_handler_posix.h ('k') | device/serial/serial_io_handler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698