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

Side by Side 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: Address a blink-side review comment Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/websocket_host.h" 5 #include "content/browser/renderer_host/websocket_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "content/browser/renderer_host/websocket_dispatcher_host.h" 9 #include "content/browser/renderer_host/websocket_dispatcher_host.h"
10 #include "content/common/websocket_messages.h" 10 #include "content/common/websocket_messages.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 channel_->SendFrame(fin, MessageTypeToOpCode(type), data); 186 channel_->SendFrame(fin, MessageTypeToOpCode(type), data);
187 } 187 }
188 188
189 void WebSocketHost::OnFlowControl(int64 quota) { 189 void WebSocketHost::OnFlowControl(int64 quota) {
190 DVLOG(3) << "WebSocketHost::OnFlowControl" 190 DVLOG(3) << "WebSocketHost::OnFlowControl"
191 << " routing_id= " << routing_id_ << " quota= " << quota; 191 << " routing_id= " << routing_id_ << " quota= " << quota;
192 192
193 channel_->SendFlowControl(quota); 193 channel_->SendFlowControl(quota);
194 } 194 }
195 195
196 void WebSocketHost::OnDropChannel(uint16 code, const std::string& reason) { 196 void WebSocketHost::OnDropChannel(bool was_clean,
197 uint16 code,
198 const std::string& reason) {
197 DVLOG(3) << "WebSocketDispatcherHost::OnDropChannel" 199 DVLOG(3) << "WebSocketDispatcherHost::OnDropChannel"
198 << " routing_id= " << routing_id_ << " code= " << code 200 << " routing_id= " << routing_id_ << " was_clean = " << was_clean
199 << " reason= " << reason; 201 << " code= " << code << " reason= " << reason;
200 202
203 // TODO(yhirano): Handle |was_clean| appropriately.
201 channel_->StartClosingHandshake(code, reason); 204 channel_->StartClosingHandshake(code, reason);
202 } 205 }
203 206
204 207
205 } // namespace content 208 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698