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

Unified Diff: net/quic/core/spdy_utils.cc

Issue 2566513004: This change removes SpdyFramer::set_enable_compression() in favor of a constructor parameter. (Closed)
Patch Set: Created 4 years 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/quic/core/quic_headers_stream_test.cc ('k') | net/spdy/buffered_spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/spdy_utils.cc
diff --git a/net/quic/core/spdy_utils.cc b/net/quic/core/spdy_utils.cc
index 366bb88351253d57b30ab9457570fd7141fce9ad..f55169615718a40d8e2d780ccb9254294d12ca71 100644
--- a/net/quic/core/spdy_utils.cc
+++ b/net/quic/core/spdy_utils.cc
@@ -28,7 +28,7 @@ namespace net {
string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers) {
size_t length = SpdyFramer::GetSerializedLength(&headers);
SpdyFrameBuilder builder(length);
- SpdyFramer framer;
+ SpdyFramer framer(SpdyFramer::DISABLE_COMPRESSION);
framer.SerializeHeaderBlockWithoutCompression(&builder, headers);
SpdySerializedFrame block(builder.take());
return string(block.data(), length);
@@ -39,7 +39,7 @@ bool SpdyUtils::ParseHeaders(const char* data,
uint32_t data_len,
int64_t* content_length,
SpdyHeaderBlock* headers) {
- SpdyFramer framer;
+ SpdyFramer framer(SpdyFramer::ENABLE_COMPRESSION);
if (!framer.ParseHeaderBlockInBuffer(data, data_len, headers) ||
headers->empty()) {
return false; // Headers were invalid.
@@ -90,7 +90,7 @@ bool SpdyUtils::ParseTrailers(const char* data,
uint32_t data_len,
size_t* final_byte_offset,
SpdyHeaderBlock* trailers) {
- SpdyFramer framer;
+ SpdyFramer framer(SpdyFramer::ENABLE_COMPRESSION);
if (!framer.ParseHeaderBlockInBuffer(data, data_len, trailers) ||
trailers->empty()) {
DVLOG(1) << "Request Trailers are invalid.";
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/spdy/buffered_spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698