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

Unified Diff: remoting/base/buffered_socket_writer.cc

Issue 1250403003: Fix BufferedSocketWriter not to return any results from Write(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « remoting/base/buffered_socket_writer.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/buffered_socket_writer.cc
diff --git a/remoting/base/buffered_socket_writer.cc b/remoting/base/buffered_socket_writer.cc
index c8a8302114a2e5f8e3fefe2cec7dc268edb032c0..827abca9df9376d2057430087f701ce3eaf63d22 100644
--- a/remoting/base/buffered_socket_writer.cc
+++ b/remoting/base/buffered_socket_writer.cc
@@ -57,7 +57,7 @@ void BufferedSocketWriter::Init(
write_failed_callback_ = write_failed_callback;
}
-bool BufferedSocketWriter::Write(
+void BufferedSocketWriter::Write(
const scoped_refptr<net::IOBufferWithSize>& data,
const base::Closure& done_task) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -65,14 +65,12 @@ bool BufferedSocketWriter::Write(
// Don't write after error.
if (is_closed())
- return false;
+ return;
queue_.push_back(new PendingPacket(
new net::DrainableIOBuffer(data.get(), data->size()), done_task));
DoWrite();
-
- return !is_closed();
}
bool BufferedSocketWriter::is_closed() {
« no previous file with comments | « remoting/base/buffered_socket_writer.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698