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

Side by Side Diff: net/websockets/websocket_errors.cc

Issue 10824081: Add WebSocketError to indicate decoding failure reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move all tests into net::(anonymous) namespace Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/websocket/websocket_errors.h"
6
7 namespace net {
8
9 Error WebSocketErrorToNetError(WebSocketError error) {
10 switch (error) {
11 case WEB_SOCKET_OK:
12 return OK;
13 case WEB_SOCKET_ERR_PROTOCOL_ERROR:
14 return ERR_WS_PROTOCOL_ERROR;
15 case WEB_SOCKET_ERR_MESSAGE_TOO_BIG:
16 return ERR_MSG_TOO_BIG;
17 default:
18 NOTREACHED();
19 }
20 }
21
22 } // namespace net
23
24 #endif // NET_WEBSOCKETS_WEBSOCKET_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698