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

Unified Diff: net/websockets/websocket_frame_parser.cc

Issue 15298012: Change the WebSocket OpCode constants to an enum (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Amend comments for IsKnown*OpCode. Created 7 years, 7 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
« no previous file with comments | « net/websockets/websocket_frame.cc ('k') | net/websockets/websocket_frame_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame_parser.cc
diff --git a/net/websockets/websocket_frame_parser.cc b/net/websockets/websocket_frame_parser.cc
index 37e50f040cb423f88e7832c35d6579e5cdca45d1..3b199128b4206b917433c9bd75856305bc4b505e 100644
--- a/net/websockets/websocket_frame_parser.cc
+++ b/net/websockets/websocket_frame_parser.cc
@@ -42,8 +42,7 @@ WebSocketFrameParser::WebSocketFrameParser()
'\0');
}
-WebSocketFrameParser::~WebSocketFrameParser() {
-}
+WebSocketFrameParser::~WebSocketFrameParser() {}
bool WebSocketFrameParser::Decode(
const char* data,
@@ -175,8 +174,7 @@ scoped_ptr<WebSocketFrameChunk> WebSocketFrameParser::DecodeFramePayload(
const char* current = &buffer_.front() + current_read_pos_;
const char* end = &buffer_.front() + buffer_.size();
uint64 next_size = std::min<uint64>(
- end - current,
- current_frame_header_->payload_length - frame_offset_);
+ end - current, current_frame_header_->payload_length - frame_offset_);
// This check must pass because |payload_length| is already checked to be
// less than std::numeric_limits<int>::max() when the header is parsed.
DCHECK_LE(next_size, static_cast<uint64>(kint32max));
@@ -193,8 +191,8 @@ scoped_ptr<WebSocketFrameChunk> WebSocketFrameParser::DecodeFramePayload(
if (current_frame_header_->masked) {
// The masking function is its own inverse, so we use the same function to
// unmask as to mask.
- MaskWebSocketFramePayload(masking_key_, frame_offset_,
- io_data, next_size);
+ MaskWebSocketFramePayload(
+ masking_key_, frame_offset_, io_data, next_size);
}
current_read_pos_ += next_size;
« no previous file with comments | « net/websockets/websocket_frame.cc ('k') | net/websockets/websocket_frame_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698