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

Unified Diff: net/spdy/spdy_framer.cc

Issue 13529032: Change the signature of SpdyFramer::SerializeNameValueBlockWithoutCompression (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/spdy_framer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.cc
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index a6423e157b1e2cd67bc24077fe9001bb0c9104e7..d29a750bb459d61ebd753345e77cb23d7d5792cc 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -1965,19 +1965,17 @@ bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData(
void SpdyFramer::SerializeNameValueBlockWithoutCompression(
SpdyFrameBuilder* builder,
- const SpdyFrameWithNameValueBlockIR& frame) const {
- const SpdyNameValueBlock* name_value_block = &(frame.name_value_block());
-
+ const SpdyNameValueBlock& name_value_block) const {
// Serialize number of headers.
if (protocol_version() < 3) {
- builder->WriteUInt16(name_value_block->size());
+ builder->WriteUInt16(name_value_block.size());
} else {
- builder->WriteUInt32(name_value_block->size());
+ builder->WriteUInt32(name_value_block.size());
}
// Serialize each header.
- for (SpdyHeaderBlock::const_iterator it = name_value_block->begin();
- it != name_value_block->end();
+ for (SpdyHeaderBlock::const_iterator it = name_value_block.begin();
+ it != name_value_block.end();
++it) {
if (protocol_version() < 3) {
builder->WriteString(it->first);
@@ -1993,14 +1991,16 @@ void SpdyFramer::SerializeNameValueBlock(
SpdyFrameBuilder* builder,
const SpdyFrameWithNameValueBlockIR& frame) {
if (!enable_compression_) {
- return SerializeNameValueBlockWithoutCompression(builder, frame);
+ return SerializeNameValueBlockWithoutCompression(builder,
+ frame.name_value_block());
}
// First build an uncompressed version to be fed into the compressor.
const size_t uncompressed_len = GetSerializedLength(
protocol_version(), &(frame.name_value_block()));
SpdyFrameBuilder uncompressed_builder(uncompressed_len);
- SerializeNameValueBlockWithoutCompression(&uncompressed_builder, frame);
+ SerializeNameValueBlockWithoutCompression(&uncompressed_builder,
+ frame.name_value_block());
scoped_ptr<SpdyFrame> uncompressed_payload(uncompressed_builder.take());
z_stream* compressor = GetHeaderCompressor();
« no previous file with comments | « net/spdy/spdy_framer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698