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

Unified Diff: net/spdy/spdy_frame_builder.h

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/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_frame_builder.h
diff --git a/net/spdy/spdy_frame_builder.h b/net/spdy/spdy_frame_builder.h
index 2cecd65b50e6a8392cc064d09c414f1489f5b42f..a91659ea89d8c876f1fd3d7cc6b363246bb511ee 100644
--- a/net/spdy/spdy_frame_builder.h
+++ b/net/spdy/spdy_frame_builder.h
@@ -92,21 +92,21 @@ class NET_EXPORT_PRIVATE SpdyFrameBuilder {
return WriteBytes(&value, sizeof(value));
}
bool WriteUInt16(uint16 value) {
- value = htons(value);
+ value = base::HostToNet16(value);
return WriteBytes(&value, sizeof(value));
}
bool WriteUInt24(uint32 value) {
- value = htonl(value);
+ value = base::HostToNet32(value);
return WriteBytes(reinterpret_cast<char*>(&value) + 1,
sizeof(value) - 1);
}
bool WriteUInt32(uint32 value) {
- value = htonl(value);
+ value = base::HostToNet32(value);
return WriteBytes(&value, sizeof(value));
}
bool WriteUInt64(uint64 value) {
- uint32 upper = htonl(value >> 32);
- uint32 lower = htonl(static_cast<uint32>(value));
+ uint32 upper = base::HostToNet32(static_cast<uint32>(value >> 32));
+ uint32 lower = base::HostToNet32(static_cast<uint32>(value));
return (WriteBytes(&upper, sizeof(upper)) &&
WriteBytes(&lower, sizeof(lower)));
}
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698