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

Side by Side Diff: net/quic/quic_spdy_compressor.cc

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_spdy_decompressor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_spdy_compressor.h" 5 #include "net/quic/quic_spdy_compressor.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 using std::string; 10 using std::string;
11 11
12 namespace net { 12 namespace net {
13 13
14 QuicSpdyCompressor::QuicSpdyCompressor() 14 QuicSpdyCompressor::QuicSpdyCompressor()
15 : spdy_framer_(3), 15 : spdy_framer_(kSpdyVersion3),
16 header_sequence_id_(1) { 16 header_sequence_id_(1) {
17 spdy_framer_.set_enable_compression(true); 17 spdy_framer_.set_enable_compression(true);
18 } 18 }
19 19
20 QuicSpdyCompressor::~QuicSpdyCompressor() { 20 QuicSpdyCompressor::~QuicSpdyCompressor() {
21 } 21 }
22 22
23 string QuicSpdyCompressor::CompressHeaders( 23 string QuicSpdyCompressor::CompressHeaders(
24 const SpdyHeaderBlock& headers) { 24 const SpdyHeaderBlock& headers) {
25 // TODO(rch): Modify the SpdyFramer to expose a 25 // TODO(rch): Modify the SpdyFramer to expose a
(...skipping 15 matching lines...) Expand all
41 string compressed; 41 string compressed;
42 compressed.reserve(arraysize(id_str) + arraysize(len_str) + serialized_len); 42 compressed.reserve(arraysize(id_str) + arraysize(len_str) + serialized_len);
43 compressed.append(id_str, arraysize(id_str)); 43 compressed.append(id_str, arraysize(id_str));
44 compressed.append(len_str, arraysize(len_str)); 44 compressed.append(len_str, arraysize(len_str));
45 compressed.append(serialized); 45 compressed.append(serialized);
46 ++header_sequence_id_; 46 ++header_sequence_id_;
47 return compressed; 47 return compressed;
48 } 48 }
49 49
50 } // namespace net 50 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_spdy_decompressor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698