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

Unified Diff: net/websockets/websocket_handshake_stream_base.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_event_interface.h ('k') | net/websockets/websocket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_handshake_stream_base.h
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h
index 71d8321824fd1497c2bd4b8a01829c37d54cfd10..b172a55e9fc2ce6b34326f480d73cec8a4366d58 100644
--- a/net/websockets/websocket_handshake_stream_base.h
+++ b/net/websockets/websocket_handshake_stream_base.h
@@ -9,6 +9,8 @@
// Since net/http can be built without linking net/websockets code,
// this file must not introduce any link-time dependencies on websockets.
+#include <string>
+
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -64,6 +66,10 @@ class NET_EXPORT WebSocketHandshakeStreamBase : public HttpStreamBase {
// been called.
virtual scoped_ptr<WebSocketStream> Upgrade() = 0;
+ // Returns a string describing the connection failure information.
+ // Returns an empty string if there is no failure.
+ virtual std::string GetFailureMessage() const = 0;
+
protected:
// As with the destructor, this must be inline.
WebSocketHandshakeStreamBase() {}
« no previous file with comments | « net/websockets/websocket_event_interface.h ('k') | net/websockets/websocket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698