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 "net/spdy/spdy_framer.h" | 7 #include "net/spdy/spdy_framer.h" |
8 #include "net/tools/quic/spdy_utils.h" | 8 #include "net/tools/quic/spdy_utils.h" |
9 | 9 |
10 using std::string; | 10 using std::string; |
11 | 11 |
12 namespace net { | 12 namespace net { |
| 13 namespace tools { |
13 | 14 |
14 static const size_t kHeaderBufInitialSize = 4096; | 15 static const size_t kHeaderBufInitialSize = 4096; |
15 | 16 |
16 QuicSpdyServerStream::QuicSpdyServerStream(QuicStreamId id, | 17 QuicSpdyServerStream::QuicSpdyServerStream(QuicStreamId id, |
17 QuicSession* session) | 18 QuicSession* session) |
18 : QuicReliableServerStream(id, session), | 19 : QuicReliableServerStream(id, session), |
19 read_buf_(new GrowableIOBuffer()), | 20 read_buf_(new GrowableIOBuffer()), |
20 request_headers_received_(false) { | 21 request_headers_received_(false) { |
21 } | 22 } |
22 | 23 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 85 |
85 size_t delta = read_buf_len - len; | 86 size_t delta = read_buf_len - len; |
86 if (delta > 0) { | 87 if (delta > 0) { |
87 mutable_body()->append(data + len, delta); | 88 mutable_body()->append(data + len, delta); |
88 } | 89 } |
89 | 90 |
90 request_headers_received_ = true; | 91 request_headers_received_ = true; |
91 return len; | 92 return len; |
92 } | 93 } |
93 | 94 |
| 95 } // namespace tools |
94 } // namespace net | 96 } // namespace net |
OLD | NEW |