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

Unified Diff: net/quic/core/quic_framer.cc

Issue 2743883002: Remove PathCloseFrame, QuicPathId, DefaultPathId and InvalidPathId. (Closed)
Patch Set: Created 3 years, 9 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/core/quic_framer.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_framer.cc
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc
index 68a0fb8394a53063532c7a65903a2bb08f5404a2..bacec506b4d1305b2157296e723494bd1c606b0e 100644
--- a/net/quic/core/quic_framer.cc
+++ b/net/quic/core/quic_framer.cc
@@ -207,11 +207,6 @@ size_t QuicFramer::GetBlockedFrameSize() {
}
// static
-size_t QuicFramer::GetPathCloseFrameSize() {
- return kQuicFrameTypeSize + kQuicPathIdSize;
-}
-
-// static
size_t QuicFramer::GetStreamIdSize(QuicStreamId stream_id) {
// Sizes are 1 through 4 bytes.
for (int i = 1; i <= 4; ++i) {
@@ -398,12 +393,6 @@ size_t QuicFramer::BuildDataPacket(const QuicPacketHeader& header,
return 0;
}
break;
- case PATH_CLOSE_FRAME:
- if (!AppendPathCloseFrame(*frame.path_close_frame, &writer)) {
- QUIC_BUG << "AppendPathCloseFrame failed";
- return 0;
- }
- break;
default:
RaiseError(QUIC_INVALID_FRAME_DATA);
QUIC_BUG << "QUIC_INVALID_FRAME_DATA";
@@ -1118,19 +1107,6 @@ bool QuicFramer::ProcessFrameData(QuicDataReader* reader,
}
continue;
}
- case PATH_CLOSE_FRAME: {
- QuicPathCloseFrame path_close_frame;
- if (!ProcessPathCloseFrame(reader, &path_close_frame)) {
- return RaiseError(QUIC_INVALID_PATH_CLOSE_DATA);
- }
- if (!visitor_->OnPathCloseFrame(path_close_frame)) {
- QUIC_DVLOG(1) << ENDPOINT
- << "Visitor asked to stop further processing.";
- // Returning true since there was no parsing error.
- return true;
- }
- continue;
- }
default:
set_detailed_error("Illegal frame type.");
@@ -1454,16 +1430,6 @@ bool QuicFramer::ProcessBlockedFrame(QuicDataReader* reader,
return true;
}
-bool QuicFramer::ProcessPathCloseFrame(QuicDataReader* reader,
- QuicPathCloseFrame* frame) {
- if (!reader->ReadBytes(&frame->path_id, 1)) {
- set_detailed_error("Unable to read path_id.");
- return false;
- }
-
- return true;
-}
-
// static
QuicStringPiece QuicFramer::GetAssociatedDataFromEncryptedPacket(
QuicVersion version,
@@ -1704,8 +1670,6 @@ size_t QuicFramer::ComputeFrameLength(
return GetWindowUpdateFrameSize();
case BLOCKED_FRAME:
return GetBlockedFrameSize();
- case PATH_CLOSE_FRAME:
- return GetPathCloseFrameSize();
case PADDING_FRAME:
DCHECK(false);
return 0;
@@ -2139,15 +2103,6 @@ bool QuicFramer::AppendBlockedFrame(const QuicBlockedFrame& frame,
return true;
}
-bool QuicFramer::AppendPathCloseFrame(const QuicPathCloseFrame& frame,
- QuicDataWriter* writer) {
- uint8_t path_id = static_cast<uint8_t>(frame.path_id);
- if (!writer->WriteUInt8(path_id)) {
- return false;
- }
- return true;
-}
-
bool QuicFramer::RaiseError(QuicErrorCode error) {
QUIC_DLOG(INFO) << ENDPOINT << "Error: " << QuicErrorCodeToString(error)
<< " detail: " << detailed_error_;
« no previous file with comments | « net/quic/core/quic_framer.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698