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

Unified Diff: mojo/edk/system/slave_connection_manager.cc

Issue 1526063003: EDK: Add TaskRunner and PlatformHandleWatcher to RawChannel. (Closed) Base URL: https://github.com/domokit/mojo.git@channel_watcher
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 | « mojo/edk/system/slave_connection_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/slave_connection_manager.cc
diff --git a/mojo/edk/system/slave_connection_manager.cc b/mojo/edk/system/slave_connection_manager.cc
index 0cc291ca9941cd4f80edc78941ee615536f0153c..0c850e8be6df745af1405360cafee00be8b96ae6 100644
--- a/mojo/edk/system/slave_connection_manager.cc
+++ b/mojo/edk/system/slave_connection_manager.cc
@@ -32,7 +32,8 @@ namespace system {
SlaveConnectionManager::SlaveConnectionManager(
embedder::PlatformSupport* platform_support)
: ConnectionManager(platform_support),
- slave_process_delegate_(),
+ slave_process_delegate_(nullptr),
+ private_thread_platform_handle_watcher_(nullptr),
awaiting_ack_type_(NOT_AWAITING_ACK),
ack_result_(nullptr),
ack_peer_process_identifier_(nullptr),
@@ -63,10 +64,8 @@ void SlaveConnectionManager::Init(
delegate_thread_task_runner_ = std::move(delegate_thread_task_runner);
slave_process_delegate_ = slave_process_delegate;
- // TODO(vtl): We'll need to plumb this in further.
- PlatformHandleWatcher* platform_handle_watcher = nullptr;
private_thread_ = platform::CreateAndStartIOThread(
- &private_thread_task_runner_, &platform_handle_watcher);
+ &private_thread_task_runner_, &private_thread_platform_handle_watcher_);
// TODO(vtl): With C++14 lambda captures, we'll be able to move
// |platform_handle|.
auto raw_platform_handle = platform_handle.release();
@@ -88,6 +87,7 @@ void SlaveConnectionManager::Shutdown() {
private_thread_->Stop();
private_thread_.reset();
private_thread_task_runner_ = nullptr;
+ private_thread_platform_handle_watcher_ = nullptr;
slave_process_delegate_ = nullptr;
delegate_thread_task_runner_ = nullptr;
}
@@ -148,7 +148,8 @@ void SlaveConnectionManager::InitOnPrivateThread(
AssertOnPrivateThread();
raw_channel_ = RawChannel::Create(platform_handle.Pass());
- raw_channel_->Init(this);
+ raw_channel_->Init(private_thread_task_runner_.Clone(),
+ private_thread_platform_handle_watcher_, this);
event_.Signal();
}
« no previous file with comments | « mojo/edk/system/slave_connection_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698