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

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

Issue 2738853002: Connections now take a ConnectionParams instead of a pipe handle. (Closed)
Patch Set: Fix Win compile Created 3 years, 9 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
Index: mojo/edk/system/channel_posix.cc
diff --git a/mojo/edk/system/channel_posix.cc b/mojo/edk/system/channel_posix.cc
index a7cf9e3df6cc83645cabcda729bdc1c23e78e471..6a1205f4cf0b7c96a46c37613bcaeff3ad561c71 100644
--- a/mojo/edk/system/channel_posix.cc
+++ b/mojo/edk/system/channel_posix.cc
@@ -88,17 +88,18 @@ class ChannelPosix : public Channel,
public base::MessageLoopForIO::Watcher {
public:
ChannelPosix(Delegate* delegate,
- ScopedPlatformHandle handle,
+ ConnectionParam connection_param,
scoped_refptr<base::TaskRunner> io_task_runner)
: Channel(delegate),
self_(this),
- handle_(std::move(handle)),
+ handle_(connection_param.TakeChannelHandle()),
io_task_runner_(io_task_runner)
#if defined(OS_MACOSX)
,
handles_to_close_(new PlatformHandleVector)
#endif
{
+ CHECK(handle_.is_valid());
}
void Start() override {
@@ -561,9 +562,10 @@ class ChannelPosix : public Channel,
// static
scoped_refptr<Channel> Channel::Create(
Delegate* delegate,
- ScopedPlatformHandle platform_handle,
+ ConnectionParam connection_param,
scoped_refptr<base::TaskRunner> io_task_runner) {
- return new ChannelPosix(delegate, std::move(platform_handle), io_task_runner);
+ return new ChannelPosix(delegate, std::move(connection_param),
+ io_task_runner);
}
} // namespace edk

Powered by Google App Engine
This is Rietveld 408576698