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

Unified Diff: net/websockets/websocket_event_interface.h

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_test.cc ('k') | net/websockets/websocket_handshake_stream_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_event_interface.h
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h
index baba88ce012dd3499fa52b58d6d0633ff13038d7..9ca96f6408cfc8adb6cdcfbfec626913f7d89073 100644
--- a/net/websockets/websocket_event_interface.h
+++ b/net/websockets/websocket_event_interface.h
@@ -71,6 +71,16 @@ class NET_EXPORT WebSocketEventInterface {
virtual ChannelState OnDropChannel(uint16 code, const std::string& reason)
WARN_UNUSED_RESULT = 0;
+ // Called when the browser fails the channel, as specified in the spec.
+ //
+ // The channel should not be used again after OnFailChannel() has been
+ // called.
+ //
+ // This method returns a ChannelState for consistency, but all implementations
+ // must delete the Channel and return CHANNEL_DELETED.
+ virtual ChannelState OnFailChannel(const std::string& message)
+ WARN_UNUSED_RESULT = 0;
+
protected:
WebSocketEventInterface() {}
« no previous file with comments | « net/websockets/websocket_channel_test.cc ('k') | net/websockets/websocket_handshake_stream_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698