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

Unified Diff: net/websockets/websocket_event_interface.h

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
« net/websockets/websocket_channel.cc ('K') | « net/websockets/websocket_channel.cc ('k') | no next file » | 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 7eb54bf8b15a09534405cbf690150adf2ce64f0d..36f7530eb52c2327adf7e7a96d2e5947d91dc24d 100644
--- a/net/websockets/websocket_event_interface.h
+++ b/net/websockets/websocket_event_interface.h
@@ -51,6 +51,7 @@ class NET_EXPORT WebSocketEventInterface {
// Called when the channel has been dropped, either due to a network close, a
// network error, or a protocol error. This may or may not be preceeded by a
// call to OnClosingHandshake().
+ // |fail| is true if the user agent is required to fail the connection.
Adam Rice 2013/10/23 03:18:06 I have just realised we may need more information
tyoshino (SeeGerritForStatus) 2013/10/23 05:21:34 I think yes. But basically we should focus on keep
yhirano 2013/10/23 05:42:23 You are right. IIUC "close with prejudice" occurs
//
// Warning: Both the |code| and |reason| are passed through to Javascript, so
// callers must take care not to provide details that could be useful to
@@ -62,7 +63,9 @@ class NET_EXPORT WebSocketEventInterface {
// It is not safe to delete the WebSocketChannel from within this
// callback. It is recommended to delete the channel after returning to the
// event loop.
- virtual void OnDropChannel(uint16 code, const std::string& reason) = 0;
+ virtual void OnDropChannel(bool fail,
+ uint16 code,
+ const std::string& reason) = 0;
protected:
WebSocketEventInterface() {}
« net/websockets/websocket_channel.cc ('K') | « net/websockets/websocket_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698