diff options
author | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 10:38:04 +0000 |
---|---|---|
committer | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 10:38:04 +0000 |
commit | 968682039b8f5c4f98a17be7a85afa623938a35d (patch) | |
tree | e0a847d169f0bbf04ee2fea5914f1953ab7d2702 /content/browser/renderer_host/websocket_host.cc | |
parent | a44d2ea810e1509891e68f678598a6d2b81004fe (diff) | |
download | chromium_src-968682039b8f5c4f98a17be7a85afa623938a35d.zip chromium_src-968682039b8f5c4f98a17be7a85afa623938a35d.tar.gz chromium_src-968682039b8f5c4f98a17be7a85afa623938a35d.tar.bz2 |
Fail WebSocket channel when handshake fails.
Call WebSocketMsg_NotifyFailure instead of
WebSocketMsg_AddChannelResponse(true, ...) when the opening handshake fails.
BUG=310405
R=ricea@chromium.org
Review URL: https://codereview.chromium.org/105833003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/websocket_host.cc')
-rw-r--r-- | content/browser/renderer_host/websocket_host.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc index aff172c..b1a0bab 100644 --- a/content/browser/renderer_host/websocket_host.cc +++ b/content/browser/renderer_host/websocket_host.cc @@ -92,6 +92,7 @@ class WebSocketEventHandler : public net::WebSocketEventInterface { virtual ChannelState OnFlowControl(int64 quota) OVERRIDE; virtual ChannelState OnDropChannel(uint16 code, const std::string& reason) OVERRIDE; + virtual ChannelState OnFailChannel(const std::string& message) OVERRIDE; private: WebSocketDispatcherHost* const dispatcher_; @@ -150,6 +151,13 @@ ChannelState WebSocketEventHandler::OnDropChannel(uint16 code, return StateCast(dispatcher_->DoDropChannel(routing_id_, code, reason)); } +ChannelState WebSocketEventHandler::OnFailChannel(const std::string& message) { + DVLOG(3) << "WebSocketEventHandler::OnFailChannel" + << " routing_id=" << routing_id_ + << " message=\"" << message << "\""; + return StateCast(dispatcher_->NotifyFailure(routing_id_, message)); +} + } // namespace WebSocketHost::WebSocketHost(int routing_id, |