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

Unified Diff: content/browser/renderer_host/websocket_host.cc

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
Index: content/browser/renderer_host/websocket_host.cc
diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc
index 4284743a70f85a909061e4222e168d0ac17bf598..67b398645027bb6faab5c609a0bb3f0b06dbedb6 100644
--- a/content/browser/renderer_host/websocket_host.cc
+++ b/content/browser/renderer_host/websocket_host.cc
@@ -69,7 +69,8 @@ class WebSocketEventHandler : public net::WebSocketEventInterface {
const std::vector<char>& data) OVERRIDE;
virtual void OnClosingHandshake() OVERRIDE;
virtual void OnFlowControl(int64 quota) OVERRIDE;
- virtual void OnDropChannel(uint16 code,
+ virtual void OnDropChannel(bool fail,
+ uint16 code,
const std::string& reason) OVERRIDE;
private:
@@ -113,9 +114,10 @@ void WebSocketEventHandler::OnFlowControl(int64 quota) {
// |this| may have been deleted here.
}
-void WebSocketEventHandler::OnDropChannel(uint16 code,
+void WebSocketEventHandler::OnDropChannel(bool fail,
+ uint16 code,
const std::string& reason) {
- dispatcher_->DoDropChannel(routing_id_, code, reason);
+ dispatcher_->DoDropChannel(routing_id_, fail, code, reason);
// |this| has been deleted here.
}
@@ -175,11 +177,14 @@ void WebSocketHost::OnFlowControl(int64 quota) {
channel_->SendFlowControl(quota);
}
-void WebSocketHost::OnDropChannel(uint16 code, const std::string& reason) {
+void WebSocketHost::OnDropChannel(bool fail,
+ uint16 code,
+ const std::string& reason) {
DVLOG(3) << "WebSocketDispatcherHost::OnDropChannel"
- << " routing_id= " << routing_id_ << " code= " << code
- << " reason= " << reason;
+ << " routing_id= " << routing_id_ << " fail = " << fail
+ << " code= " << code << " reason= " << reason;
+ // TODO(yhirano): Use |fail| appropriately.
Adam Rice 2013/10/23 03:18:06 We should just delete the WebSocketChannel if |fai
yhirano 2013/10/23 05:42:23 Will do in a future CL.
channel_->StartClosingHandshake(code, reason);
}

Powered by Google App Engine
This is Rietveld 408576698