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_reliable_server_stream.h" | 5 #include "net/tools/quic/quic_reliable_server_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "net/tools/quic/quic_in_memory_cache.h" | 9 #include "net/tools/quic/quic_in_memory_cache.h" |
10 | 10 |
11 using base::StringPiece; | 11 using base::StringPiece; |
12 | 12 |
13 namespace net { | 13 namespace net { |
| 14 namespace tools { |
14 | 15 |
15 QuicReliableServerStream::QuicReliableServerStream(QuicStreamId id, | 16 QuicReliableServerStream::QuicReliableServerStream(QuicStreamId id, |
16 QuicSession* session) | 17 QuicSession* session) |
17 : ReliableQuicStream(id, session) { | 18 : ReliableQuicStream(id, session) { |
18 } | 19 } |
19 | 20 |
20 | 21 |
21 void QuicReliableServerStream::SendResponse() { | 22 void QuicReliableServerStream::SendResponse() { |
22 // Find response in cache. If not found, send error response. | 23 // Find response in cache. If not found, send error response. |
23 const QuicInMemoryCache::Response* response = | 24 const QuicInMemoryCache::Response* response = |
(...skipping 20 matching lines...) Expand all Loading... |
44 | 45 |
45 QuicConsumedData QuicReliableServerStream::WriteData(StringPiece data, | 46 QuicConsumedData QuicReliableServerStream::WriteData(StringPiece data, |
46 bool fin) { | 47 bool fin) { |
47 // We only support SPDY and HTTP, and neither handles bidirectional streaming. | 48 // We only support SPDY and HTTP, and neither handles bidirectional streaming. |
48 if (!read_side_closed()) { | 49 if (!read_side_closed()) { |
49 CloseReadSide(); | 50 CloseReadSide(); |
50 } | 51 } |
51 return ReliableQuicStream::WriteData(data, fin); | 52 return ReliableQuicStream::WriteData(data, fin); |
52 } | 53 } |
53 | 54 |
| 55 } // namespace tools |
54 } // namespace net | 56 } // namespace net |
OLD | NEW |