| Index: mojo/edk/system/channel_win.cc
|
| diff --git a/mojo/edk/system/channel_win.cc b/mojo/edk/system/channel_win.cc
|
| index 5d0b0cfc6285eb861d1bf984a377d6e95b2c3f9c..38744ab99b16e424daf497b24695fc17469c1e0b 100644
|
| --- a/mojo/edk/system/channel_win.cc
|
| +++ b/mojo/edk/system/channel_win.cc
|
| @@ -80,8 +80,6 @@
|
| handle_(std::move(handle)),
|
| io_task_runner_(io_task_runner) {
|
| CHECK(handle_.is_valid());
|
| -
|
| - wait_for_connect_ = handle_.get().needs_connection;
|
| }
|
|
|
| void Start() override {
|
| @@ -141,29 +139,6 @@
|
| base::MessageLoopForIO::current()->RegisterIOHandler(
|
| handle_.get().handle, this);
|
|
|
| - if (wait_for_connect_) {
|
| - BOOL ok = ConnectNamedPipe(handle_.get().handle,
|
| - &connect_context_.overlapped);
|
| - if (ok) {
|
| - PLOG(ERROR) << "Unexpected success while waiting for pipe connection";
|
| - OnError();
|
| - return;
|
| - }
|
| -
|
| - const DWORD err = GetLastError();
|
| - switch (err) {
|
| - case ERROR_PIPE_CONNECTED:
|
| - wait_for_connect_ = false;
|
| - break;
|
| - case ERROR_IO_PENDING:
|
| - AddRef();
|
| - return;
|
| - case ERROR_NO_DATA:
|
| - OnError();
|
| - return;
|
| - }
|
| - }
|
| -
|
| // Now that we have registered our IOHandler, we can start writing.
|
| {
|
| base::AutoLock lock(write_lock_);
|
| @@ -204,16 +179,6 @@
|
| DWORD error) override {
|
| if (error != ERROR_SUCCESS) {
|
| OnError();
|
| - } else if (context == &connect_context_) {
|
| - DCHECK(wait_for_connect_);
|
| - wait_for_connect_ = false;
|
| - ReadMore(0);
|
| -
|
| - base::AutoLock lock(write_lock_);
|
| - if (delay_writes_) {
|
| - delay_writes_ = false;
|
| - WriteNextNoLock();
|
| - }
|
| } else if (context == &read_context_) {
|
| OnReadDone(static_cast<size_t>(bytes_transfered));
|
| } else {
|
| @@ -312,7 +277,6 @@
|
| ScopedPlatformHandle handle_;
|
| scoped_refptr<base::TaskRunner> io_task_runner_;
|
|
|
| - base::MessageLoopForIO::IOContext connect_context_;
|
| base::MessageLoopForIO::IOContext read_context_;
|
| base::MessageLoopForIO::IOContext write_context_;
|
|
|
| @@ -323,8 +287,6 @@
|
|
|
| bool reject_writes_ = false;
|
| std::deque<MessageView> outgoing_messages_;
|
| -
|
| - bool wait_for_connect_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChannelWin);
|
| };
|
|
|