Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: net/quic/test_tools/crypto_test_utils.cc

Issue 1979743002: Rename the QUIC stream frame fields frame_buffer and frame_length to data_buffer and data_length be… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@121700577
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include <openssl/bn.h> 7 #include <openssl/bn.h>
8 #include <openssl/ec.h> 8 #include <openssl/ec.h>
9 #include <openssl/ecdsa.h> 9 #include <openssl/ecdsa.h>
10 #include <openssl/evp.h> 10 #include <openssl/evp.h>
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 size_t index = *inout_packet_index; 785 size_t index = *inout_packet_index;
786 for (; index < source_conn->encrypted_packets_.size(); index++) { 786 for (; index < source_conn->encrypted_packets_.size(); index++) {
787 if (!framer.ProcessPacket(*source_conn->encrypted_packets_[index])) { 787 if (!framer.ProcessPacket(*source_conn->encrypted_packets_[index])) {
788 // The framer will be unable to decrypt forward-secure packets sent after 788 // The framer will be unable to decrypt forward-secure packets sent after
789 // the handshake is complete. Don't treat them as handshake packets. 789 // the handshake is complete. Don't treat them as handshake packets.
790 break; 790 break;
791 } 791 }
792 792
793 for (const QuicStreamFrame* stream_frame : framer.stream_frames()) { 793 for (const QuicStreamFrame* stream_frame : framer.stream_frames()) {
794 ASSERT_TRUE(crypto_framer.ProcessInput( 794 ASSERT_TRUE(crypto_framer.ProcessInput(
795 StringPiece(stream_frame->frame_buffer, stream_frame->frame_length))); 795 StringPiece(stream_frame->data_buffer, stream_frame->data_length)));
796 ASSERT_FALSE(crypto_visitor.error()); 796 ASSERT_FALSE(crypto_visitor.error());
797 } 797 }
798 } 798 }
799 *inout_packet_index = index; 799 *inout_packet_index = index;
800 800
801 QuicConnectionPeer::SwapCrypters(dest_conn, framer.framer()); 801 QuicConnectionPeer::SwapCrypters(dest_conn, framer.framer());
802 802
803 ASSERT_EQ(0u, crypto_framer.InputBytesRemaining()); 803 ASSERT_EQ(0u, crypto_framer.InputBytesRemaining());
804 804
805 for (const CryptoHandshakeMessage& message : crypto_visitor.messages()) { 805 for (const CryptoHandshakeMessage& message : crypto_visitor.messages()) {
806 dest_stream->OnHandshakeMessage(message); 806 dest_stream->OnHandshakeMessage(message);
807 } 807 }
808 } 808 }
809 809
810 } // namespace test 810 } // namespace test
811 } // namespace net 811 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698