| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/quic_framer_peer.h" | 5 #include "net/quic/test_tools/quic_framer_peer.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "net/quic/core/quic_framer.h" | 8 #include "net/quic/core/quic_framer.h" |
| 9 #include "net/quic/core/quic_protocol.h" | 9 #include "net/quic/core/quic_protocol.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 framer->last_serialized_connection_id_ = connection_id; | 28 framer->last_serialized_connection_id_ = connection_id; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // static | 31 // static |
| 32 void QuicFramerPeer::SetLastPacketNumber(QuicFramer* framer, | 32 void QuicFramerPeer::SetLastPacketNumber(QuicFramer* framer, |
| 33 QuicPacketNumber packet_number) { | 33 QuicPacketNumber packet_number) { |
| 34 framer->last_packet_number_ = packet_number; | 34 framer->last_packet_number_ = packet_number; |
| 35 } | 35 } |
| 36 | 36 |
| 37 // static | 37 // static |
| 38 void QuicFramerPeer::SetLargestPacketNumber(QuicFramer* framer, |
| 39 QuicPacketNumber packet_number) { |
| 40 framer->largest_packet_number_ = packet_number; |
| 41 } |
| 42 |
| 43 // static |
| 38 void QuicFramerPeer::SetPerspective(QuicFramer* framer, | 44 void QuicFramerPeer::SetPerspective(QuicFramer* framer, |
| 39 Perspective perspective) { | 45 Perspective perspective) { |
| 40 framer->perspective_ = perspective; | 46 framer->perspective_ = perspective; |
| 41 } | 47 } |
| 42 | 48 |
| 43 // static | 49 // static |
| 44 void QuicFramerPeer::SwapCrypters(QuicFramer* framer1, QuicFramer* framer2) { | 50 void QuicFramerPeer::SwapCrypters(QuicFramer* framer1, QuicFramer* framer2) { |
| 45 for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; i++) { | 51 for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; i++) { |
| 46 framer1->encrypter_[i].swap(framer2->encrypter_[i]); | 52 framer1->encrypter_[i].swap(framer2->encrypter_[i]); |
| 47 } | 53 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 return framer->last_path_id_; | 82 return framer->last_path_id_; |
| 77 } | 83 } |
| 78 | 84 |
| 79 // static | 85 // static |
| 80 bool QuicFramerPeer::IsPathClosed(QuicFramer* framer, QuicPathId path_id) { | 86 bool QuicFramerPeer::IsPathClosed(QuicFramer* framer, QuicPathId path_id) { |
| 81 return base::ContainsKey(framer->closed_paths_, path_id); | 87 return base::ContainsKey(framer->closed_paths_, path_id); |
| 82 } | 88 } |
| 83 | 89 |
| 84 } // namespace test | 90 } // namespace test |
| 85 } // namespace net | 91 } // namespace net |
| OLD | NEW |