Pass was_clean from WebSocketChannel to renderer
Previously, the browser always set |was_clean| to true when it sent an
OnDropChannel message to the renderer. Set the value correctly in
WebSocketChannel and pass it through to WebSocketDispatcherHost.
BUG=341343
Review URL: https://codereview.chromium.org/149793006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250082 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h
index c99376c..923581a 100644
--- a/net/websockets/websocket_event_interface.h
+++ b/net/websockets/websocket_event_interface.h
@@ -68,12 +68,16 @@
// callers must take care not to provide details that could be useful to
// attackers attempting to use WebSockets to probe networks.
//
+ // |was_clean| should be true if the closing handshake completed successfully.
+ //
// The channel should not be used again after OnDropChannel() has been
// called.
//
// This method returns a ChannelState for consistency, but all implementations
// must delete the Channel and return CHANNEL_DELETED.
- virtual ChannelState OnDropChannel(uint16 code, const std::string& reason)
+ virtual ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason)
WARN_UNUSED_RESULT = 0;
// Called when the browser fails the channel, as specified in the spec.