OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/quartc/quartc_stream.h" | 5 #include "net/quic/quartc/quartc_stream.h" |
6 | 6 |
7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
8 #include "net/quic/core/crypto/quic_random.h" | 8 #include "net/quic/core/crypto/quic_random.h" |
9 #include "net/quic/core/quic_session.h" | 9 #include "net/quic/core/quic_session.h" |
10 #include "net/quic/core/quic_simple_buffer_allocator.h" | 10 #include "net/quic/core/quic_simple_buffer_allocator.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 QuartcStream* CreateIncomingDynamicStream(QuicStreamId id) override { | 53 QuartcStream* CreateIncomingDynamicStream(QuicStreamId id) override { |
54 return nullptr; | 54 return nullptr; |
55 } | 55 } |
56 | 56 |
57 QuartcStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { | 57 QuartcStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { |
58 return nullptr; | 58 return nullptr; |
59 } | 59 } |
60 | 60 |
61 QuicCryptoStream* GetCryptoStream() override { return nullptr; } | 61 const QuicCryptoStream* GetCryptoStream() const override { return nullptr; } |
| 62 QuicCryptoStream* GetMutableCryptoStream() override { return nullptr; } |
62 | 63 |
63 // Called by QuicStream when they want to close stream. | 64 // Called by QuicStream when they want to close stream. |
64 void SendRstStream(QuicStreamId id, | 65 void SendRstStream(QuicStreamId id, |
65 QuicRstStreamErrorCode error, | 66 QuicRstStreamErrorCode error, |
66 QuicStreamOffset bytes_written) override {} | 67 QuicStreamOffset bytes_written) override {} |
67 | 68 |
68 // Sets whether data is written to buffer, or else if this is write blocked. | 69 // Sets whether data is written to buffer, or else if this is write blocked. |
69 void set_writable(bool writable) { writable_ = writable; } | 70 void set_writable(bool writable) { writable_ = writable; } |
70 | 71 |
71 // Tracks whether the stream is write blocked and its priority. | 72 // Tracks whether the stream is write blocked and its priority. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 TEST_F(QuartcStreamTest, CloseStream) { | 257 TEST_F(QuartcStreamTest, CloseStream) { |
257 CreateReliableQuicStream(); | 258 CreateReliableQuicStream(); |
258 EXPECT_FALSE(mock_stream_delegate_->closed()); | 259 EXPECT_FALSE(mock_stream_delegate_->closed()); |
259 stream_->OnClose(); | 260 stream_->OnClose(); |
260 EXPECT_TRUE(mock_stream_delegate_->closed()); | 261 EXPECT_TRUE(mock_stream_delegate_->closed()); |
261 } | 262 } |
262 | 263 |
263 } // namespace | 264 } // namespace |
264 } // namespace test | 265 } // namespace test |
265 } // namespace net | 266 } // namespace net |
OLD | NEW |