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

Unified Diff: blimp/net/blimp_message_output_buffer.cc

Issue 1909143002: Use ConnectionErrorObserver, not callbacks, for error handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: blimp/net/blimp_message_output_buffer.cc
diff --git a/blimp/net/blimp_message_output_buffer.cc b/blimp/net/blimp_message_output_buffer.cc
index b5c5ec5612b0f8c0a45fe4860160369540325fda..0ad4a126a6b79a16f8f301cad97a8790452b18c1 100644
--- a/blimp/net/blimp_message_output_buffer.cc
+++ b/blimp/net/blimp_message_output_buffer.cc
@@ -144,18 +144,11 @@ void BlimpMessageOutputBuffer::WriteNextMessageIfReady() {
}
void BlimpMessageOutputBuffer::OnWriteComplete(int result) {
- DCHECK_LE(result, net::OK);
- VLOG(2) << "Write complete, result=" << result;
-
- if (result == net::OK) {
- ack_buffer_.push_back(std::move(write_buffer_.front()));
- write_buffer_.pop_front();
- WriteNextMessageIfReady();
- } else {
- // An error occurred while writing to the network connection.
- // Stop writing more messages until a new connection is established.
- DLOG(WARNING) << "Write error (result=" << result << ")";
- }
+ DCHECK_EQ(result, net::OK);
Wez 2016/04/21 22:44:29 It seems that you're changing the MessageProcessor
Kevin M 2016/04/22 22:10:41 Done.
+ VLOG(2) << "Write complete.";
Wez 2016/04/21 22:44:29 nit: None of our other log messages, above, seem t
Kevin M 2016/04/22 22:10:41 Done.
+ ack_buffer_.push_back(std::move(write_buffer_.front()));
+ write_buffer_.pop_front();
+ WriteNextMessageIfReady();
}
} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698