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

Unified Diff: net/spdy/spdy_frame_builder.cc

Issue 358493002: Land recent SPDY changes (through 70021377) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on code-review-feedback updates. Created 6 years, 6 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
« no previous file with comments | « net/spdy/mock_spdy_framer_visitor.h ('k') | net/spdy/spdy_framer.h » ('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 a7eb91d71ce8199d9e68b08831340d5580045670..b45c0ab81dfd25f526b6255867861c8eee9b773d 100644
--- a/net/spdy/spdy_frame_builder.cc
+++ b/net/spdy/spdy_frame_builder.cc
@@ -16,23 +16,23 @@ namespace {
// A special structure for the 8 bit flags and 24 bit length fields.
union FlagsAndLength {
- uint8 flags_[4]; // 8 bits
- uint32 length_; // 24 bits
+ uint8 flags[4]; // 8 bits
+ uint32 length; // 24 bits
};
// Creates a 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 = htonl(static_cast<uint32>(length));
DCHECK_EQ(0, flags & ~kControlFlagsMask);
- flags_length.flags_[0] = flags;
+ flags_length.flags[0] = flags;
return flags_length;
}
} // namespace
- SpdyFrameBuilder::SpdyFrameBuilder(size_t size, SpdyMajorVersion version)
+SpdyFrameBuilder::SpdyFrameBuilder(size_t size, SpdyMajorVersion version)
: buffer_(new char[size]),
capacity_(size),
length_(0),
@@ -89,9 +89,9 @@ 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 = htonl(length_field);
DCHECK_EQ(0, flags & ~kDataFlagsMask);
- flags_length.flags_[0] = flags;
+ flags_length.flags[0] = flags;
success &= WriteBytes(&flags_length, sizeof(flags_length));
DCHECK_EQ(framer.GetDataFrameMinimumSize(), length());
return success;
« no previous file with comments | « net/spdy/mock_spdy_framer_visitor.h ('k') | net/spdy/spdy_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698