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

Side by Side Diff: net/tools/quic/chlo_extractor.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/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_packet_printer_bin.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/tools/quic/chlo_extractor.h" 5 #include "net/tools/quic/chlo_extractor.h"
6 6
7 #include "net/quic/crypto/crypto_framer.h" 7 #include "net/quic/crypto/crypto_framer.h"
8 #include "net/quic/crypto/crypto_handshake_message.h" 8 #include "net/quic/crypto/crypto_handshake_message.h"
9 #include "net/quic/crypto/crypto_protocol.h" 9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/crypto/quic_decrypter.h" 10 #include "net/quic/crypto/quic_decrypter.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return true; 83 return true;
84 } 84 }
85 bool ChloFramerVisitor::OnUnauthenticatedHeader( 85 bool ChloFramerVisitor::OnUnauthenticatedHeader(
86 const QuicPacketHeader& header) { 86 const QuicPacketHeader& header) {
87 return true; 87 return true;
88 } 88 }
89 bool ChloFramerVisitor::OnPacketHeader(const QuicPacketHeader& header) { 89 bool ChloFramerVisitor::OnPacketHeader(const QuicPacketHeader& header) {
90 return true; 90 return true;
91 } 91 }
92 bool ChloFramerVisitor::OnStreamFrame(const QuicStreamFrame& frame) { 92 bool ChloFramerVisitor::OnStreamFrame(const QuicStreamFrame& frame) {
93 StringPiece data(frame.frame_buffer, frame.frame_length); 93 StringPiece data(frame.data_buffer, frame.data_length);
94 if (frame.stream_id == kCryptoStreamId && frame.offset == 0 && 94 if (frame.stream_id == kCryptoStreamId && frame.offset == 0 &&
95 data.starts_with("CHLO")) { 95 data.starts_with("CHLO")) {
96 CryptoFramer crypto_framer; 96 CryptoFramer crypto_framer;
97 crypto_framer.set_visitor(this); 97 crypto_framer.set_visitor(this);
98 if (!crypto_framer.ProcessInput(data)) { 98 if (!crypto_framer.ProcessInput(data)) {
99 return false; 99 return false;
100 } 100 }
101 } 101 }
102 return true; 102 return true;
103 } 103 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 QuicFramer framer(versions, QuicTime::Zero(), Perspective::IS_SERVER); 161 QuicFramer framer(versions, QuicTime::Zero(), Perspective::IS_SERVER);
162 ChloFramerVisitor visitor(&framer, delegate); 162 ChloFramerVisitor visitor(&framer, delegate);
163 framer.set_visitor(&visitor); 163 framer.set_visitor(&visitor);
164 if (!framer.ProcessPacket(packet)) { 164 if (!framer.ProcessPacket(packet)) {
165 return false; 165 return false;
166 } 166 }
167 return visitor.found_chlo(); 167 return visitor.found_chlo();
168 } 168 }
169 169
170 } // namespace net 170 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_packet_printer_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698