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

Unified Diff: net/spdy/spdy_headers_block_parser.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: net/spdy/spdy_headers_block_parser.cc
diff --git a/net/spdy/spdy_headers_block_parser.cc b/net/spdy/spdy_headers_block_parser.cc
index eab55d2ad298960745afb5061c973c23f9911384..abde00fdbfae7614e4e6333d8e27c0e2ecde1efb 100644
--- a/net/spdy/spdy_headers_block_parser.cc
+++ b/net/spdy/spdy_headers_block_parser.cc
@@ -12,18 +12,19 @@ const size_t SpdyHeadersBlockParser::kMaximumFieldLength = 16 * 1024;
SpdyHeadersBlockParser::SpdyHeadersBlockParser(
SpdyMajorVersion spdy_version,
- SpdyHeadersHandlerInterface* handler) :
- state_(READING_HEADER_BLOCK_LEN),
- length_field_size_(LengthFieldSizeForVersion(spdy_version)),
- max_headers_in_block_(MaxNumberOfHeadersForVersion(spdy_version)),
- remaining_key_value_pairs_for_frame_(0),
- handler_(handler),
- error_(OK) {
+ SpdyHeadersHandlerInterface* handler)
+ : state_(READING_HEADER_BLOCK_LEN),
+ length_field_size_(LengthFieldSizeForVersion(spdy_version)),
+ max_headers_in_block_(MaxNumberOfHeadersForVersion(spdy_version)),
+ remaining_key_value_pairs_for_frame_(0),
+ handler_(handler),
+ error_(OK) {
// The handler that we set must not be NULL.
DCHECK(handler_ != NULL);
}
-SpdyHeadersBlockParser::~SpdyHeadersBlockParser() {}
+SpdyHeadersBlockParser::~SpdyHeadersBlockParser() {
+}
bool SpdyHeadersBlockParser::HandleControlFrameHeadersData(
SpdyStreamId stream_id,
@@ -48,8 +49,8 @@ bool SpdyHeadersBlockParser::HandleControlFrameHeadersData(
// Apply the parsing state machine to the remaining prefix
// from last invocation, plus newly-available headers data.
- Reader reader(prefix.buffer(), prefix.length(),
- headers_data, headers_data_length);
+ Reader reader(
+ prefix.buffer(), prefix.length(), headers_data, headers_data_length);
while (error_ == OK) {
ParserState next_state(FINISHED_HEADER);
@@ -121,7 +122,7 @@ bool SpdyHeadersBlockParser::HandleControlFrameHeadersData(
void SpdyHeadersBlockParser::ParseBlockLength(Reader* reader) {
ParseLength(reader, &remaining_key_value_pairs_for_frame_);
if (error_ == OK &&
- remaining_key_value_pairs_for_frame_ > max_headers_in_block_) {
+ remaining_key_value_pairs_for_frame_ > max_headers_in_block_) {
error_ = HEADER_BLOCK_TOO_LARGE;
}
if (error_ == OK) {
@@ -131,8 +132,7 @@ void SpdyHeadersBlockParser::ParseBlockLength(Reader* reader) {
void SpdyHeadersBlockParser::ParseFieldLength(Reader* reader) {
ParseLength(reader, &next_field_length_);
- if (error_ == OK &&
- next_field_length_ > kMaximumFieldLength) {
+ if (error_ == OK && next_field_length_ > kMaximumFieldLength) {
error_ = HEADER_FIELD_TOO_LARGE;
}
}
@@ -146,9 +146,9 @@ void SpdyHeadersBlockParser::ParseLength(Reader* reader,
}
// Convert from network to host order and return the parsed out integer.
if (length_field_size_ == sizeof(uint32_t)) {
- *parsed_length = ntohl(*reinterpret_cast<const uint32_t *>(buffer));
+ *parsed_length = ntohl(*reinterpret_cast<const uint32_t*>(buffer));
} else {
- *parsed_length = ntohs(*reinterpret_cast<const uint16_t *>(buffer));
+ *parsed_length = ntohs(*reinterpret_cast<const uint16_t*>(buffer));
}
}

Powered by Google App Engine
This is Rietveld 408576698