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_client_stream.h" | 5 #include "net/tools/quic/quic_spdy_client_stream.h" |
6 | 6 |
7 #include "net/spdy/spdy_framer.h" | 7 #include "net/spdy/spdy_framer.h" |
8 #include "net/tools/quic/quic_client_session.h" | 8 #include "net/tools/quic/quic_client_session.h" |
9 #include "net/tools/quic/spdy_utils.h" | 9 #include "net/tools/quic/spdy_utils.h" |
10 | 10 |
11 using base::StringPiece; | 11 using base::StringPiece; |
12 using std::string; | 12 using std::string; |
13 | 13 |
14 namespace net { | 14 namespace net { |
| 15 namespace tools { |
15 | 16 |
16 static const size_t kHeaderBufInitialSize = 4096; | 17 static const size_t kHeaderBufInitialSize = 4096; |
17 | 18 |
18 QuicSpdyClientStream::QuicSpdyClientStream(QuicStreamId id, | 19 QuicSpdyClientStream::QuicSpdyClientStream(QuicStreamId id, |
19 QuicClientSession* session) | 20 QuicClientSession* session) |
20 : QuicReliableClientStream(id, session), | 21 : QuicReliableClientStream(id, session), |
21 read_buf_(new GrowableIOBuffer()), | 22 read_buf_(new GrowableIOBuffer()), |
22 response_headers_received_(false) { | 23 response_headers_received_(false) { |
23 } | 24 } |
24 | 25 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } | 78 } |
78 | 79 |
79 size_t delta = read_buf_len - len; | 80 size_t delta = read_buf_len - len; |
80 if (delta > 0) { | 81 if (delta > 0) { |
81 mutable_data()->append(data + len, delta); | 82 mutable_data()->append(data + len, delta); |
82 } | 83 } |
83 | 84 |
84 return len; | 85 return len; |
85 } | 86 } |
86 | 87 |
| 88 } // namespace tools |
87 } // namespace net | 89 } // namespace net |
OLD | NEW |