Index: remoting/protocol/channel_multiplexer.cc |
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc |
index e19a9a1229227a4f1ea8363f1efbbdfc80df53ec..ff5f990184baa42dbd485f18d236d03eafa458d1 100644 |
--- a/remoting/protocol/channel_multiplexer.cc |
+++ b/remoting/protocol/channel_multiplexer.cc |
@@ -84,7 +84,7 @@ class ChannelMultiplexer::MuxChannel { |
// Called by MuxSocket. |
void OnSocketDestroyed(); |
- bool DoWrite(scoped_ptr<MultiplexPacket> packet, |
+ void DoWrite(scoped_ptr<MultiplexPacket> packet, |
const base::Closure& done_task); |
int DoRead(const scoped_refptr<net::IOBuffer>& buffer, int buffer_len); |
@@ -182,7 +182,7 @@ void ChannelMultiplexer::MuxChannel::OnSocketDestroyed() { |
socket_ = nullptr; |
} |
-bool ChannelMultiplexer::MuxChannel::DoWrite( |
+void ChannelMultiplexer::MuxChannel::DoWrite( |
scoped_ptr<MultiplexPacket> packet, |
const base::Closure& done_task) { |
packet->set_channel_id(send_id_); |
@@ -190,7 +190,7 @@ bool ChannelMultiplexer::MuxChannel::DoWrite( |
packet->set_channel_name(name_); |
id_sent_ = true; |
} |
- return multiplexer_->DoWrite(packet.Pass(), done_task); |
+ multiplexer_->DoWrite(packet.Pass(), done_task); |
} |
int ChannelMultiplexer::MuxChannel::DoRead( |
@@ -256,14 +256,9 @@ int ChannelMultiplexer::MuxSocket::Write( |
packet->mutable_data()->assign(buffer->data(), size); |
write_pending_ = true; |
- bool result = channel_->DoWrite(packet.Pass(), base::Bind( |
+ channel_->DoWrite(packet.Pass(), base::Bind( |
&ChannelMultiplexer::MuxSocket::OnWriteComplete, AsWeakPtr())); |
- if (!result) { |
- // Cannot complete the write, e.g. if the connection has been terminated. |
- return net::ERR_FAILED; |
- } |
- |
// OnWriteComplete() might be called above synchronously. |
if (write_pending_) { |
DCHECK(write_callback_.is_null()); |
@@ -465,9 +460,9 @@ void ChannelMultiplexer::OnIncomingPacket(scoped_ptr<MultiplexPacket> packet, |
channel->OnIncomingPacket(packet.Pass(), done_task); |
} |
-bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, |
+void ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, |
const base::Closure& done_task) { |
- return writer_.Write(SerializeAndFrameMessage(*packet), done_task); |
+ writer_.Write(SerializeAndFrameMessage(*packet), done_task); |
} |
} // namespace protocol |