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

Unified Diff: net/websockets/websocket_channel.cc

Issue 105833003: Fail WebSocket channel when handshake fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | « net/websockets/websocket_channel.h ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.cc
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 61a47b71eb812d9a133f2f99ed5f09225df50600..34c58b396bfe7e80b504f47ba5cbeed777902347 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -112,8 +112,8 @@ class WebSocketChannel::ConnectDelegate
// |this| may have been deleted.
}
- virtual void OnFailure(uint16 websocket_error) OVERRIDE {
- creator_->OnConnectFailure(websocket_error);
+ virtual void OnFailure(const std::string& message) OVERRIDE {
+ creator_->OnConnectFailure(message);
// |this| has been deleted.
}
@@ -312,11 +312,11 @@ void WebSocketChannel::OnConnectSuccess(scoped_ptr<WebSocketStream> stream) {
// |this| may have been deleted.
}
-void WebSocketChannel::OnConnectFailure(uint16 websocket_error) {
+void WebSocketChannel::OnConnectFailure(const std::string& message) {
DCHECK_EQ(CONNECTING, state_);
state_ = CLOSED;
stream_request_.reset();
- AllowUnused(event_interface_->OnAddChannelResponse(true, ""));
+ AllowUnused(event_interface_->OnFailChannel(message));
// |this| has been deleted.
}
« no previous file with comments | « net/websockets/websocket_channel.h ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698