| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 SimpleQuicFramer::SimpleQuicFramer() | 159 SimpleQuicFramer::SimpleQuicFramer() |
| 160 : framer_(QuicSupportedVersions(), | 160 : framer_(QuicSupportedVersions(), |
| 161 QuicTime::Zero(), | 161 QuicTime::Zero(), |
| 162 Perspective::IS_SERVER) {} | 162 Perspective::IS_SERVER) {} |
| 163 | 163 |
| 164 SimpleQuicFramer::SimpleQuicFramer(const QuicVersionVector& supported_versions) | 164 SimpleQuicFramer::SimpleQuicFramer(const QuicVersionVector& supported_versions) |
| 165 : framer_(supported_versions, QuicTime::Zero(), Perspective::IS_SERVER) {} | 165 : framer_(supported_versions, QuicTime::Zero(), Perspective::IS_SERVER) {} |
| 166 | 166 |
| 167 SimpleQuicFramer::SimpleQuicFramer(const QuicVersionVector& supported_versions, |
| 168 Perspective perspective) |
| 169 : framer_(supported_versions, QuicTime::Zero(), perspective) {} |
| 170 |
| 167 SimpleQuicFramer::~SimpleQuicFramer() {} | 171 SimpleQuicFramer::~SimpleQuicFramer() {} |
| 168 | 172 |
| 169 bool SimpleQuicFramer::ProcessPacket(const QuicEncryptedPacket& packet) { | 173 bool SimpleQuicFramer::ProcessPacket(const QuicEncryptedPacket& packet) { |
| 170 visitor_.reset(new SimpleFramerVisitor); | 174 visitor_.reset(new SimpleFramerVisitor); |
| 171 framer_.set_visitor(visitor_.get()); | 175 framer_.set_visitor(visitor_.get()); |
| 172 return framer_.ProcessPacket(packet); | 176 return framer_.ProcessPacket(packet); |
| 173 } | 177 } |
| 174 | 178 |
| 175 void SimpleQuicFramer::Reset() { | 179 void SimpleQuicFramer::Reset() { |
| 176 visitor_.reset(new SimpleFramerVisitor); | 180 visitor_.reset(new SimpleFramerVisitor); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 return visitor_->goaway_frames(); | 225 return visitor_->goaway_frames(); |
| 222 } | 226 } |
| 223 | 227 |
| 224 const vector<QuicConnectionCloseFrame>& | 228 const vector<QuicConnectionCloseFrame>& |
| 225 SimpleQuicFramer::connection_close_frames() const { | 229 SimpleQuicFramer::connection_close_frames() const { |
| 226 return visitor_->connection_close_frames(); | 230 return visitor_->connection_close_frames(); |
| 227 } | 231 } |
| 228 | 232 |
| 229 } // namespace test | 233 } // namespace test |
| 230 } // namespace net | 234 } // namespace net |
| OLD | NEW |