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

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: wez feedback 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..942d5751cfd718521a25d71f3a530b092bb14ac8 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;
+ VLOG(2) << "Write complete";
haibinlu 2016/05/03 21:23:05 DCHECK_EQ(net::OK, result)
Wez 2016/05/07 22:13:47 See my comment on the earlier review ;)
Kevin M 2016/05/24 20:47:04 I added a DCHECK for positive values.
Kevin M 2016/05/24 20:47:04 Sorry, was that in reference to the callback signa
- 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 << ")";
- }
+ 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