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

Unified Diff: mojo/edk/system/test/test_io_thread.h

Issue 1514113004: EDK: Convert TestIOThread to use the new I/O thread abstraction. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « no previous file | mojo/edk/system/test/test_io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/test/test_io_thread.h
diff --git a/mojo/edk/system/test/test_io_thread.h b/mojo/edk/system/test/test_io_thread.h
index b27b3a45471b1ef47ee2e0939e7330b4dfdcdb93..fd84b16c6c072e0c7d96b2b04df650705b653c0b 100644
--- a/mojo/edk/system/test/test_io_thread.h
+++ b/mojo/edk/system/test/test_io_thread.h
@@ -6,14 +6,19 @@
#define MOJO_EDK_SYSTEM_TEST_TEST_IO_THREAD_H_
#include <functional>
+#include <memory>
-#include "base/threading/thread.h"
-#include "mojo/edk/base_edk/platform_task_runner_impl.h"
#include "mojo/edk/platform/task_runner.h"
#include "mojo/edk/util/ref_ptr.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
+
+namespace platform {
+class PlatformHandleWatcher;
+class Thread;
+}
+
namespace system {
namespace test {
@@ -41,18 +46,18 @@ class TestIOThread final {
// posted task is executed (note the deadlock risk!).
void PostTaskAndWait(std::function<void()>&& task);
- base::MessageLoopForIO* message_loop() {
- return static_cast<base::MessageLoopForIO*>(io_thread_.message_loop());
- }
-
const util::RefPtr<platform::TaskRunner>& task_runner() const {
return io_task_runner_;
}
+ platform::PlatformHandleWatcher* platform_handle_watcher() const {
+ return io_platform_handle_watcher_;
+ }
+
private:
- base::Thread io_thread_;
- bool io_thread_started_;
+ std::unique_ptr<platform::Thread> io_thread_;
util::RefPtr<platform::TaskRunner> io_task_runner_;
+ platform::PlatformHandleWatcher* io_platform_handle_watcher_;
MOJO_DISALLOW_COPY_AND_ASSIGN(TestIOThread);
};
« no previous file with comments | « no previous file | mojo/edk/system/test/test_io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698