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

Unified Diff: net/quic/quic_framer.cc

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flow_controller_test.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 3ad2cad11ff2d9251734c6b3b2c2a88388c55bb6..6557f608a8293e8d282bc56267a6e371a6b4a57d 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -1378,8 +1378,8 @@ bool QuicFramer::ProcessStreamFrame(QuicDataReader* reader,
return false;
}
}
- frame->frame_buffer = data.data();
- frame->frame_length = static_cast<uint16_t>(data.length());
+ frame->data_buffer = data.data();
+ frame->data_length = static_cast<uint16_t>(data.length());
return true;
}
@@ -1661,13 +1661,8 @@ bool QuicFramer::ProcessRstStreamFrame(QuicDataReader* reader,
}
if (error_code >= QUIC_STREAM_LAST_ERROR) {
- if (FLAGS_quic_ignore_invalid_error_code) {
- // Ignore invalid stream error code if any.
- error_code = QUIC_STREAM_LAST_ERROR;
- } else {
- set_detailed_error("Invalid rst stream error code.");
- return false;
- }
+ // Ignore invalid stream error code if any.
+ error_code = QUIC_STREAM_LAST_ERROR;
}
frame->error_code = static_cast<QuicRstStreamErrorCode>(error_code);
@@ -1683,13 +1678,8 @@ bool QuicFramer::ProcessConnectionCloseFrame(QuicDataReader* reader,
}
if (error_code >= QUIC_LAST_ERROR) {
- if (FLAGS_quic_ignore_invalid_error_code) {
- // Ignore invalid QUIC error code if any.
- error_code = QUIC_LAST_ERROR;
- } else {
- set_detailed_error("Invalid error code.");
- return false;
- }
+ // Ignore invalid QUIC error code if any.
+ error_code = QUIC_LAST_ERROR;
}
frame->error_code = static_cast<QuicErrorCode>(error_code);
@@ -1713,13 +1703,8 @@ bool QuicFramer::ProcessGoAwayFrame(QuicDataReader* reader,
}
if (error_code >= QUIC_LAST_ERROR) {
- if (FLAGS_quic_ignore_invalid_error_code) {
- // Ignore invalid QUIC error code if any.
- error_code = QUIC_LAST_ERROR;
- } else {
- set_detailed_error("Invalid error code.");
- return false;
- }
+ // Ignore invalid QUIC error code if any.
+ error_code = QUIC_LAST_ERROR;
}
frame->error_code = static_cast<QuicErrorCode>(error_code);
@@ -2019,7 +2004,7 @@ size_t QuicFramer::ComputeFrameLength(
return GetMinStreamFrameSize(frame.stream_frame->stream_id,
frame.stream_frame->offset,
last_frame_in_packet) +
- frame.stream_frame->frame_length;
+ frame.stream_frame->data_length;
case ACK_FRAME: {
return GetAckFrameSize(*frame.ack_frame, packet_number_length);
}
@@ -2139,14 +2124,14 @@ bool QuicFramer::AppendStreamFrame(const QuicStreamFrame& frame,
return false;
}
if (!no_stream_frame_length) {
- if ((frame.frame_length > numeric_limits<uint16_t>::max()) ||
- !writer->WriteUInt16(static_cast<uint16_t>(frame.frame_length))) {
+ if ((frame.data_length > numeric_limits<uint16_t>::max()) ||
+ !writer->WriteUInt16(static_cast<uint16_t>(frame.data_length))) {
QUIC_BUG << "Writing stream frame length failed";
return false;
}
}
- if (!writer->WriteBytes(frame.frame_buffer, frame.frame_length)) {
+ if (!writer->WriteBytes(frame.data_buffer, frame.data_length)) {
QUIC_BUG << "Writing frame data failed.";
return false;
}
« no previous file with comments | « net/quic/quic_flow_controller_test.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698