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

Unified Diff: net/spdy/spdy_framer.cc

Issue 10138003: Remove SpdyFramer::CompressFrame() and use CompressControlFrame instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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') | net/spdy/spdy_framer_test.cc » ('j') | 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 57cc48b2bea1dfb5ed610a3ba1be74eba50fa3a6..929bf15a6ebff59000fe33a79d88d789b3ed4d4a 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -1257,29 +1257,6 @@ static const int kCompressorLevel = 9;
static const int kCompressorWindowSizeInBits = 11;
static const int kCompressorMemLevel = 1;
-SpdyFrame* SpdyFramer::CompressFrame(const SpdyFrame& frame) {
- if (frame.is_control_frame()) {
- return CompressControlFrame(
- reinterpret_cast<const SpdyControlFrame&>(frame));
- }
- return NULL;
-}
-
-bool SpdyFramer::IsCompressible(const SpdyFrame& frame) const {
- // The important frames to compress are those which contain large
- // amounts of compressible data - namely the headers in the SYN_STREAM
- // and SYN_REPLY.
- if (frame.is_control_frame()) {
- const SpdyControlFrame& control_frame =
- reinterpret_cast<const SpdyControlFrame&>(frame);
- return control_frame.type() == SYN_STREAM ||
- control_frame.type() == SYN_REPLY;
- }
-
- // We don't compress Data frames.
- return false;
-}
-
z_stream* SpdyFramer::GetHeaderCompressor() {
if (header_compressor_.get())
return header_compressor_.get(); // Already initialized.
@@ -1554,6 +1531,22 @@ SpdyFrame* SpdyFramer::DuplicateFrame(const SpdyFrame& frame) {
return new_frame;
}
+bool SpdyFramer::IsCompressible(const SpdyFrame& frame) const {
+ // The important frames to compress are those which contain large
+ // amounts of compressible data - namely the headers in the SYN_STREAM
+ // and SYN_REPLY.
+ if (frame.is_control_frame()) {
+ const SpdyControlFrame& control_frame =
+ reinterpret_cast<const SpdyControlFrame&>(frame);
+ return control_frame.type() == SYN_STREAM ||
+ control_frame.type() == SYN_REPLY ||
+ control_frame.type() == HEADERS;
+ }
+
+ // We don't compress Data frames.
+ return false;
+}
+
size_t SpdyFramer::GetMinimumControlFrameSize(int version,
SpdyControlType type) {
switch (type) {
« no previous file with comments | « net/spdy/spdy_framer.h ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698