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

Unified Diff: net/spdy/spdy_frame_builder.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_frame_builder.h ('k') | net/spdy/spdy_frame_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_frame_builder.cc
diff --git a/net/spdy/spdy_frame_builder.cc b/net/spdy/spdy_frame_builder.cc
index 5015c9a49a632f511f877fa818aa1f17f048f5ef..3d8d2e5ac719ec1d54ff6659fbefa9c8fa78dc22 100644
--- a/net/spdy/spdy_frame_builder.cc
+++ b/net/spdy/spdy_frame_builder.cc
@@ -24,7 +24,7 @@ union FlagsAndLength {
FlagsAndLength CreateFlagsAndLength(uint8 flags, size_t length) {
DCHECK_EQ(0u, length & ~static_cast<size_t>(kLengthMask));
FlagsAndLength flags_length;
- flags_length.length = htonl(static_cast<uint32>(length));
+ flags_length.length = base::HostToNet32(static_cast<uint32>(length));
DCHECK_EQ(0, flags & ~kControlFlagsMask);
flags_length.flags[0] = flags;
return flags_length;
@@ -89,7 +89,7 @@ bool SpdyFrameBuilder::WriteDataFrameHeader(const SpdyFramer& framer,
size_t length_field = capacity_ - framer.GetDataFrameMinimumSize();
DCHECK_EQ(0u, length_field & ~static_cast<size_t>(kLengthMask));
FlagsAndLength flags_length;
- flags_length.length = htonl(length_field);
+ flags_length.length = base::HostToNet32(static_cast<uint32>(length_field));
DCHECK_EQ(0, flags & ~kDataFlagsMask);
flags_length.flags[0] = flags;
success &= WriteBytes(&flags_length, sizeof(flags_length));
« no previous file with comments | « net/spdy/spdy_frame_builder.h ('k') | net/spdy/spdy_frame_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698