OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tools/quic/quic_spdy_server_stream.h" | 5 #include "net/tools/quic/quic_spdy_server_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "net/quic/quic_session.h" | 10 #include "net/quic/quic_data_stream.h" |
| 11 #include "net/quic/quic_spdy_session.h" |
11 #include "net/quic/spdy_utils.h" | 12 #include "net/quic/spdy_utils.h" |
12 #include "net/spdy/spdy_protocol.h" | 13 #include "net/spdy/spdy_protocol.h" |
13 #include "net/tools/quic/quic_in_memory_cache.h" | 14 #include "net/tools/quic/quic_in_memory_cache.h" |
14 | 15 |
15 using base::StringPiece; | 16 using base::StringPiece; |
16 using base::StringToInt; | 17 using base::StringToInt; |
17 using std::string; | 18 using std::string; |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 namespace tools { | 21 namespace tools { |
21 | 22 |
22 QuicSpdyServerStream::QuicSpdyServerStream(QuicStreamId id, | 23 QuicSpdyServerStream::QuicSpdyServerStream(QuicStreamId id, |
23 QuicSession* session) | 24 QuicSpdySession* session) |
24 : QuicDataStream(id, session), | 25 : QuicDataStream(id, session), content_length_(-1) { |
25 content_length_(-1) { | |
26 } | 26 } |
27 | 27 |
28 QuicSpdyServerStream::~QuicSpdyServerStream() { | 28 QuicSpdyServerStream::~QuicSpdyServerStream() { |
29 } | 29 } |
30 | 30 |
31 uint32 QuicSpdyServerStream::ProcessData(const char* data, uint32 data_len) { | 31 uint32 QuicSpdyServerStream::ProcessData(const char* data, uint32 data_len) { |
32 if (!headers_decompressed()) { | 32 if (!headers_decompressed()) { |
33 // Let the headers data accumulate in the underlying QuicDataStream. | 33 // Let the headers data accumulate in the underlying QuicDataStream. |
34 return 0; | 34 return 0; |
35 } | 35 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 const string QuicSpdyServerStream::GetHostKey() { | 163 const string QuicSpdyServerStream::GetHostKey() { |
164 // SPDY/4 uses ":authority" instead of ":host". | 164 // SPDY/4 uses ":authority" instead of ":host". |
165 return version() > QUIC_VERSION_24 ? ":authority" : ":host"; | 165 return version() > QUIC_VERSION_24 ? ":authority" : ":host"; |
166 } | 166 } |
167 | 167 |
168 } // namespace tools | 168 } // namespace tools |
169 } // namespace net | 169 } // namespace net |
OLD | NEW |