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

Unified Diff: net/spdy/spdy_headers_block_parser.cc

Issue 1471073010: Removed unused include of winsock.h/inet.h from sys_byteorder.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include inet.h for things other than byte-swap Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_headers_block_parser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10057dda770bc32e3f331f74cc490605e4e695f5..27f52e8b24afe3cd7a80edf1bb0562056828ece6 100644
--- a/net/spdy/spdy_headers_block_parser.cc
+++ b/net/spdy/spdy_headers_block_parser.cc
@@ -168,9 +168,11 @@ 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 =
+ base::NetToHost32(*reinterpret_cast<const uint32_t *>(buffer));
} else {
- *parsed_length = ntohs(*reinterpret_cast<const uint16_t *>(buffer));
+ *parsed_length =
+ base::NetToHost16(*reinterpret_cast<const uint16_t *>(buffer));
}
}
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_headers_block_parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698