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

Unified Diff: device/serial/serial_io_handler.h

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_connection_unittest.cc ('k') | device/serial/serial_io_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler.h
diff --git a/device/serial/serial_io_handler.h b/device/serial/serial_io_handler.h
index 5f93d63270b0ffcc8f4a31db94d21054a90a1a2c..1b2a8c49d4ac47fd0dca17174c6e9d50da4d23b6 100644
--- a/device/serial/serial_io_handler.h
+++ b/device/serial/serial_io_handler.h
@@ -8,7 +8,8 @@
#include "base/callback.h"
#include "base/files/file.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/non_thread_safe.h"
#include "device/serial/buffer.h"
#include "device/serial/serial.mojom.h"
@@ -24,8 +25,8 @@ class SerialIoHandler : public base::NonThreadSafe,
public:
// Constructs an instance of some platform-specific subclass.
static scoped_refptr<SerialIoHandler> Create(
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop);
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner);
typedef base::Callback<void(bool success)> OpenCompleteCallback;
@@ -84,8 +85,8 @@ class SerialIoHandler : public base::NonThreadSafe,
protected:
explicit SerialIoHandler(
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop,
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop);
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner);
virtual ~SerialIoHandler();
// Performs a platform-specific read operation. This must guarantee that
@@ -114,8 +115,8 @@ class SerialIoHandler : public base::NonThreadSafe,
// Requests access to the underlying serial device, if needed.
virtual void 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);
// Performs platform-specific, one-time port configuration on open.
virtual bool PostOpen();
@@ -180,7 +181,7 @@ class SerialIoHandler : public base::NonThreadSafe,
// Continues an Open operation on the FILE thread.
void StartOpen(const std::string& port,
- scoped_refptr<base::MessageLoopProxy> io_message_loop);
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
// Finalizes an Open operation (continued from StartOpen) on the IO thread.
void FinishOpen(base::File file);
@@ -208,9 +209,9 @@ class SerialIoHandler : public base::NonThreadSafe,
// Callback to handle the completion of a pending Open() request.
OpenCompleteCallback open_complete_;
- scoped_refptr<base::MessageLoopProxy> file_thread_message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_;
// On Chrome OS, PermissionBrokerClient should be called on the UI thread.
- scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_;
DISALLOW_COPY_AND_ASSIGN(SerialIoHandler);
};
« no previous file with comments | « device/serial/serial_connection_unittest.cc ('k') | device/serial/serial_io_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698