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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool OnAckFrame(const QuicAckFrame& frame) override { | 69 bool OnAckFrame(const QuicAckFrame& frame) override { |
70 ack_frames_.push_back(frame); | 70 ack_frames_.push_back(frame); |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override { | 74 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override { |
75 stop_waiting_frames_.push_back(frame); | 75 stop_waiting_frames_.push_back(frame); |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
| 79 bool OnPaddingFrame(const QuicPaddingFrame& frame) override { |
| 80 padding_frames_.push_back(frame); |
| 81 return true; |
| 82 } |
| 83 |
79 bool OnPingFrame(const QuicPingFrame& frame) override { | 84 bool OnPingFrame(const QuicPingFrame& frame) override { |
80 ping_frames_.push_back(frame); | 85 ping_frames_.push_back(frame); |
81 return true; | 86 return true; |
82 } | 87 } |
83 | 88 |
84 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override { | 89 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override { |
85 rst_stream_frames_.push_back(frame); | 90 rst_stream_frames_.push_back(frame); |
86 return true; | 91 return true; |
87 } | 92 } |
88 | 93 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 141 } |
137 | 142 |
138 private: | 143 private: |
139 QuicErrorCode error_; | 144 QuicErrorCode error_; |
140 bool has_header_; | 145 bool has_header_; |
141 QuicPacketHeader header_; | 146 QuicPacketHeader header_; |
142 std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_; | 147 std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_; |
143 std::unique_ptr<QuicPublicResetPacket> public_reset_packet_; | 148 std::unique_ptr<QuicPublicResetPacket> public_reset_packet_; |
144 vector<QuicAckFrame> ack_frames_; | 149 vector<QuicAckFrame> ack_frames_; |
145 vector<QuicStopWaitingFrame> stop_waiting_frames_; | 150 vector<QuicStopWaitingFrame> stop_waiting_frames_; |
| 151 vector<QuicPaddingFrame> padding_frames_; |
146 vector<QuicPingFrame> ping_frames_; | 152 vector<QuicPingFrame> ping_frames_; |
147 vector<QuicStreamFrame*> stream_frames_; | 153 vector<QuicStreamFrame*> stream_frames_; |
148 vector<QuicRstStreamFrame> rst_stream_frames_; | 154 vector<QuicRstStreamFrame> rst_stream_frames_; |
149 vector<QuicGoAwayFrame> goaway_frames_; | 155 vector<QuicGoAwayFrame> goaway_frames_; |
150 vector<QuicConnectionCloseFrame> connection_close_frames_; | 156 vector<QuicConnectionCloseFrame> connection_close_frames_; |
151 vector<QuicWindowUpdateFrame> window_update_frames_; | 157 vector<QuicWindowUpdateFrame> window_update_frames_; |
152 vector<QuicBlockedFrame> blocked_frames_; | 158 vector<QuicBlockedFrame> blocked_frames_; |
153 vector<QuicPathCloseFrame> path_close_frames_; | 159 vector<QuicPathCloseFrame> path_close_frames_; |
154 vector<string*> stream_data_; | 160 vector<string*> stream_data_; |
155 | 161 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 return visitor_->goaway_frames(); | 231 return visitor_->goaway_frames(); |
226 } | 232 } |
227 | 233 |
228 const vector<QuicConnectionCloseFrame>& | 234 const vector<QuicConnectionCloseFrame>& |
229 SimpleQuicFramer::connection_close_frames() const { | 235 SimpleQuicFramer::connection_close_frames() const { |
230 return visitor_->connection_close_frames(); | 236 return visitor_->connection_close_frames(); |
231 } | 237 } |
232 | 238 |
233 } // namespace test | 239 } // namespace test |
234 } // namespace net | 240 } // namespace net |
OLD | NEW |