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

Unified Diff: net/spdy/spdy_headers_block_parser_test.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_headers_block_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_headers_block_parser_test.cc
diff --git a/net/spdy/spdy_headers_block_parser_test.cc b/net/spdy/spdy_headers_block_parser_test.cc
index 324a1e51747fe95833dc71af42686146621211cd..433fda0cc12e5221515832fd3c148cf558fd2ffb 100644
--- a/net/spdy/spdy_headers_block_parser_test.cc
+++ b/net/spdy/spdy_headers_block_parser_test.cc
@@ -81,10 +81,10 @@ class SpdyHeadersBlockParserTest :
string EncodeLength(uint32_t len) {
char buffer[4];
if (length_field_size_ == sizeof(uint32_t)) {
- uint32_t net_order_len = htonl(len);
+ uint32_t net_order_len = base::HostToNet32(len);
memcpy(buffer, &net_order_len, length_field_size_);
} else if (length_field_size_ == sizeof(uint16_t)) {
- uint16_t net_order_len = htons(len);
+ uint16_t net_order_len = base::HostToNet16(static_cast<uint16_t>(len));
memcpy(buffer, &net_order_len, length_field_size_);
} else {
CHECK(false) << "Invalid length field size";
« no previous file with comments | « net/spdy/spdy_headers_block_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698