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

Unified Diff: net/websockets/websocket_frame_parser.h

Issue 10824081: Add WebSocketError to indicate decoding failure reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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: net/websockets/websocket_frame_parser.h
diff --git a/net/websockets/websocket_frame_parser.h b/net/websockets/websocket_frame_parser.h
index a6d55ea16355429dd65d8d04115298b3bb1b22d1..1b973c9c904b2d9377e6a23ced7686ad3e60e5f6 100644
--- a/net/websockets/websocket_frame_parser.h
+++ b/net/websockets/websocket_frame_parser.h
@@ -42,6 +42,7 @@ class NET_EXPORT_PRIVATE WebSocketFrameParser {
// Returns true if the parser has ever failed to decode a WebSocket frame.
// TODO(yutak): Provide human-readable description of failure.
bool failed() const { return failed_; }
mmenke 2012/08/01 14:44:59 Do we still need this? If so, think we should be
Takashi Toyoshima 2012/08/02 08:11:35 Ah, that is right. I'll remove this function and m
+ WebSocketError error_code() const { return error_code_; }
mmenke 2012/08/01 14:44:59 Suggest calling this websocket_error instead, to m
Takashi Toyoshima 2012/08/02 08:11:35 Done.
private:
// Tries to decode a frame header from |current_read_pos_|.
@@ -75,6 +76,7 @@ class NET_EXPORT_PRIVATE WebSocketFrameParser {
uint64 frame_offset_;
bool failed_;
+ WebSocketError error_code_;
DISALLOW_COPY_AND_ASSIGN(WebSocketFrameParser);
};

Powered by Google App Engine
This is Rietveld 408576698