| 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/quic/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
| 6 | 6 |
| 7 #include "net/quic/quic_ack_notifier.h" | 7 #include "net/quic/quic_ack_notifier.h" |
| 8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
| 9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" |
| 10 #include "net/quic/quic_write_blocked_list.h" | 10 #include "net/quic/quic_write_blocked_list.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const bool kShouldProcessData = true; | 41 const bool kShouldProcessData = true; |
| 42 | 42 |
| 43 class TestStream : public ReliableQuicStream { | 43 class TestStream : public ReliableQuicStream { |
| 44 public: | 44 public: |
| 45 TestStream(QuicStreamId id, | 45 TestStream(QuicStreamId id, |
| 46 QuicSession* session, | 46 QuicSession* session, |
| 47 bool should_process_data) | 47 bool should_process_data) |
| 48 : ReliableQuicStream(id, session), | 48 : ReliableQuicStream(id, session), |
| 49 should_process_data_(should_process_data) {} | 49 should_process_data_(should_process_data) {} |
| 50 | 50 |
| 51 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE { | 51 virtual uint32 ProcessRawData(const char* data, uint32 data_len) override { |
| 52 EXPECT_NE(0u, data_len); | 52 EXPECT_NE(0u, data_len); |
| 53 DVLOG(1) << "ProcessData data_len: " << data_len; | 53 DVLOG(1) << "ProcessData data_len: " << data_len; |
| 54 data_ += string(data, data_len); | 54 data_ += string(data, data_len); |
| 55 return should_process_data_ ? data_len : 0; | 55 return should_process_data_ ? data_len : 0; |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual QuicPriority EffectivePriority() const OVERRIDE { | 58 virtual QuicPriority EffectivePriority() const override { |
| 59 return QuicUtils::HighestPriority(); | 59 return QuicUtils::HighestPriority(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 using ReliableQuicStream::WriteOrBufferData; | 62 using ReliableQuicStream::WriteOrBufferData; |
| 63 using ReliableQuicStream::CloseReadSide; | 63 using ReliableQuicStream::CloseReadSide; |
| 64 using ReliableQuicStream::CloseWriteSide; | 64 using ReliableQuicStream::CloseWriteSide; |
| 65 using ReliableQuicStream::OnClose; | 65 using ReliableQuicStream::OnClose; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 bool should_process_data_; | 68 bool should_process_data_; |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); | 644 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); |
| 645 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); | 645 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); |
| 646 stream_->OnStreamReset(rst_frame); | 646 stream_->OnStreamReset(rst_frame); |
| 647 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); | 647 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); |
| 648 } | 648 } |
| 649 | 649 |
| 650 } // namespace | 650 } // namespace |
| 651 } // namespace test | 651 } // namespace test |
| 652 } // namespace net | 652 } // namespace net |
| OLD | NEW |