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

Unified Diff: net/websockets/websocket_channel.cc

Issue 34753008: Notify WebSocket connection failure, chromium side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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: net/websockets/websocket_channel.cc
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index c370bd7d40ef782bb66c30e2cd1aee62cdbae2e6..f547afb1123036955f6961b4bede752096d797ac 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -292,7 +292,10 @@ void WebSocketChannel::OnWriteDone(bool synchronous, int result) {
stream_->Close();
if (state_ != CLOSED) {
state_ = CLOSED;
- event_interface_->OnDropChannel(kWebSocketErrorAbnormalClosure,
+ // TODO(yhirano): Set |fail| appropriately.
Adam Rice 2013/10/23 03:18:06 The OnDropChannel-calling code changes a bit in ht
yhirano 2013/10/23 05:42:23 OK, I will implement this in future CLs.
+ bool fail = false;
+ event_interface_->OnDropChannel(fail,
+ kWebSocketErrorAbnormalClosure,
"Abnormal Closure");
}
return;
@@ -356,7 +359,9 @@ void WebSocketChannel::OnReadDone(bool synchronous, int result) {
code = closing_code_;
reason = closing_reason_;
}
- event_interface_->OnDropChannel(code, reason);
+ // TODO(yhirano): Set |fail| appropriately.
+ bool fail = false;
+ event_interface_->OnDropChannel(fail, code, reason);
}
return;
}
@@ -554,7 +559,9 @@ void WebSocketChannel::FailChannel(ExposeError expose,
state_ = CLOSED;
if (old_state != CLOSED) {
- event_interface_->OnDropChannel(code, reason);
+ // TODO(yhirano): Set |fail| appropriately.
+ bool fail = false;
+ event_interface_->OnDropChannel(fail, code, reason);
}
}

Powered by Google App Engine
This is Rietveld 408576698