| 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_spdy_compressor.h" | 9 #include "net/quic/quic_spdy_compressor.h" |
| 10 #include "net/quic/quic_spdy_decompressor.h" | 10 #include "net/quic/quic_spdy_decompressor.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 : ReliableQuicStream(id, session), | 42 : ReliableQuicStream(id, session), |
| 43 should_process_data_(should_process_data) {} | 43 should_process_data_(should_process_data) {} |
| 44 | 44 |
| 45 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE { | 45 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE { |
| 46 EXPECT_NE(0u, data_len); | 46 EXPECT_NE(0u, data_len); |
| 47 DVLOG(1) << "ProcessData data_len: " << data_len; | 47 DVLOG(1) << "ProcessData data_len: " << data_len; |
| 48 data_ += string(data, data_len); | 48 data_ += string(data, data_len); |
| 49 return should_process_data_ ? data_len : 0; | 49 return should_process_data_ ? data_len : 0; |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual QuicPriority EffectivePriority() const OVERRIDE { return 0; } | 52 virtual QuicPriority EffectivePriority() const OVERRIDE { |
| 53 return QuicUtils::HighestPriority(); |
| 54 } |
| 53 | 55 |
| 54 using ReliableQuicStream::WriteOrBufferData; | 56 using ReliableQuicStream::WriteOrBufferData; |
| 55 using ReliableQuicStream::CloseReadSide; | 57 using ReliableQuicStream::CloseReadSide; |
| 56 using ReliableQuicStream::CloseWriteSide; | 58 using ReliableQuicStream::CloseWriteSide; |
| 57 | 59 |
| 58 const string& data() const { return data_; } | 60 const string& data() const { return data_; } |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 bool should_process_data_; | 63 bool should_process_data_; |
| 62 string data_; | 64 string data_; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); | 223 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); |
| 222 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); | 224 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); |
| 223 stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR, false); | 225 stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR, false); |
| 224 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); | 226 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); |
| 225 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); | 227 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); |
| 226 } | 228 } |
| 227 | 229 |
| 228 } // namespace | 230 } // namespace |
| 229 } // namespace test | 231 } // namespace test |
| 230 } // namespace net | 232 } // namespace net |
| OLD | NEW |