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

Unified Diff: net/quic/core/crypto/crypto_framer.cc

Issue 2847753002: Some changes to prepare for endian change for QUIC: 1) Make data reader/write be able to read/write… (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/crypto/null_decrypter.cc » ('j') | net/quic/core/quic_data_writer_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_framer.cc
diff --git a/net/quic/core/crypto/crypto_framer.cc b/net/quic/core/crypto/crypto_framer.cc
index b978bf0b9318db78a4896e6f6d6daf5029b91327..77d1bfa46bfee0bf478c868de6851b4a83564773 100644
--- a/net/quic/core/crypto/crypto_framer.cc
+++ b/net/quic/core/crypto/crypto_framer.cc
@@ -108,7 +108,7 @@ QuicData* CryptoFramer::ConstructHandshakeMessage(
}
std::unique_ptr<char[]> buffer(new char[len]);
- QuicDataWriter writer(len, buffer.get(), perspective);
+ QuicDataWriter writer(len, buffer.get(), perspective, HOST_BYTE_ORDER);
if (!writer.WriteTag(message.tag())) {
DCHECK(false) << "Failed to write message tag.";
return nullptr;
@@ -197,7 +197,8 @@ QuicErrorCode CryptoFramer::Process(QuicStringPiece input,
Perspective perspective) {
// Add this data to the buffer.
buffer_.append(input.data(), input.length());
- QuicDataReader reader(buffer_.data(), buffer_.length(), perspective);
+ QuicDataReader reader(buffer_.data(), buffer_.length(), perspective,
+ HOST_BYTE_ORDER);
switch (state_) {
case STATE_READING_TAG:
« no previous file with comments | « no previous file | net/quic/core/crypto/null_decrypter.cc » ('j') | net/quic/core/quic_data_writer_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698