summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 23:28:26 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 23:28:26 +0000
commitb35d68d66741c6adc8a5f2aac75c3323a5e2c86c (patch)
treeffc529086531f1036525db42cfe8164f0feea3b5 /net
parent901a5e3835718e8872f38af32d65fce7ea3fcbeb (diff)
downloadchromium_src-b35d68d66741c6adc8a5f2aac75c3323a5e2c86c.zip
chromium_src-b35d68d66741c6adc8a5f2aac75c3323a5e2c86c.tar.gz
chromium_src-b35d68d66741c6adc8a5f2aac75c3323a5e2c86c.tar.bz2
Change the signature of SpdyFramer::SerializeNameValueBlockWithoutCompression
This lands server change 44867738. Review URL: https://codereview.chromium.org/13529032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/spdy/spdy_framer.cc18
-rw-r--r--net/spdy/spdy_framer.h19
2 files changed, 19 insertions, 18 deletions
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index a6423e1..d29a750 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();
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 266dabf..cebc320 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -504,6 +504,14 @@ class NET_EXPORT_PRIVATE SpdyFramer {
SpdyPriority GetLowestPriority() const { return spdy_version_ < 3 ? 3 : 7; }
SpdyPriority GetHighestPriority() const { return 0; }
+ // Deliver the given control frame's compressed headers block to the visitor
+ // in decompressed form, in chunks. Returns true if the visitor has
+ // accepted all of the chunks.
+ bool IncrementallyDecompressControlFrameHeaderData(
+ SpdyStreamId stream_id,
+ const char* data,
+ size_t len);
+
protected:
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression);
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameSizesAreValidated);
@@ -556,14 +564,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
z_stream* GetHeaderCompressor();
z_stream* GetHeaderDecompressor();
- // Deliver the given control frame's compressed headers block to the visitor
- // in decompressed form, in chunks. Returns true if the visitor has
- // accepted all of the chunks.
- bool IncrementallyDecompressControlFrameHeaderData(
- SpdyStreamId stream_id,
- const char* data,
- size_t len);
-
+ private:
// Deliver the given control frame's uncompressed headers block to the
// visitor in chunks. Returns true if the visitor has accepted all of the
// chunks.
@@ -585,7 +586,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
void SerializeNameValueBlockWithoutCompression(
SpdyFrameBuilder* builder,
- const SpdyFrameWithNameValueBlockIR& frame) const;
+ const SpdyNameValueBlock& name_value_block) const;
// Compresses automatically according to enable_compression_.
void SerializeNameValueBlock(