| 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/test_tools/simple_quic_framer.h" | 5 #include "net/quic/test_tools/simple_quic_framer.h" |
| 6 | 6 |
| 7 #include "net/quic/crypto/crypto_framer.h" | 7 #include "net/quic/crypto/crypto_framer.h" |
| 8 #include "net/quic/crypto/quic_decrypter.h" | 8 #include "net/quic/crypto/quic_decrypter.h" |
| 9 #include "net/quic/crypto/quic_encrypter.h" | 9 #include "net/quic/crypto/quic_encrypter.h" |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 } | 166 } |
| 167 | 167 |
| 168 const vector<QuicStreamFrame>& SimpleQuicFramer::stream_frames() const { | 168 const vector<QuicStreamFrame>& SimpleQuicFramer::stream_frames() const { |
| 169 return visitor_->stream_frames(); | 169 return visitor_->stream_frames(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 const vector<QuicRstStreamFrame>& SimpleQuicFramer::rst_stream_frames() const { | 172 const vector<QuicRstStreamFrame>& SimpleQuicFramer::rst_stream_frames() const { |
| 173 return visitor_->rst_stream_frames(); | 173 return visitor_->rst_stream_frames(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 CryptoHandshakeMessage* SimpleQuicFramer::HandshakeMessage(size_t index) const { | |
| 177 if (index >= visitor_->stream_frames().size()) { | |
| 178 return NULL; | |
| 179 } | |
| 180 return CryptoFramer::ParseMessage(visitor_->stream_frames()[index].data); | |
| 181 } | |
| 182 | |
| 183 const vector<QuicCongestionFeedbackFrame>& | 176 const vector<QuicCongestionFeedbackFrame>& |
| 184 SimpleQuicFramer::feedback_frames() const { | 177 SimpleQuicFramer::feedback_frames() const { |
| 185 return visitor_->feedback_frames(); | 178 return visitor_->feedback_frames(); |
| 186 } | 179 } |
| 187 | 180 |
| 188 const vector<QuicGoAwayFrame>& | 181 const vector<QuicGoAwayFrame>& |
| 189 SimpleQuicFramer::goaway_frames() const { | 182 SimpleQuicFramer::goaway_frames() const { |
| 190 return visitor_->goaway_frames(); | 183 return visitor_->goaway_frames(); |
| 191 } | 184 } |
| 192 | 185 |
| 193 const vector<QuicConnectionCloseFrame>& | 186 const vector<QuicConnectionCloseFrame>& |
| 194 SimpleQuicFramer::connection_close_frames() const { | 187 SimpleQuicFramer::connection_close_frames() const { |
| 195 return visitor_->connection_close_frames(); | 188 return visitor_->connection_close_frames(); |
| 196 } | 189 } |
| 197 | 190 |
| 198 } // namespace test | 191 } // namespace test |
| 199 } // namespace net | 192 } // namespace net |
| OLD | NEW |