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

Side by Side Diff: net/quic/quic_framer.cc

Issue 350973003: Killing off quic V17. Not flag protected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_framer_test.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/quic_framer.h" 5 #include "net/quic/quic_framer.h"
6 6
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/crypto/crypto_framer.h" 9 #include "net/quic/crypto/crypto_framer.h"
10 #include "net/quic/crypto/crypto_handshake_message.h" 10 #include "net/quic/crypto/crypto_handshake_message.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 << QuicVersionToString(quic_version_); 387 << QuicVersionToString(quic_version_);
388 return kNoPacket; 388 return kNoPacket;
389 } 389 }
390 if (!AppendStopWaitingFrame( 390 if (!AppendStopWaitingFrame(
391 header, *frame.stop_waiting_frame, &writer)) { 391 header, *frame.stop_waiting_frame, &writer)) {
392 LOG(DFATAL) << "AppendStopWaitingFrame failed"; 392 LOG(DFATAL) << "AppendStopWaitingFrame failed";
393 return kNoPacket; 393 return kNoPacket;
394 } 394 }
395 break; 395 break;
396 case PING_FRAME: 396 case PING_FRAME:
397 if (quic_version_ <= QUIC_VERSION_17) { 397 if (quic_version_ <= QUIC_VERSION_16) {
398 LOG(DFATAL) << "Attempt to add a PingFrame in " 398 LOG(DFATAL) << "Attempt to add a PingFrame in "
399 << QuicVersionToString(quic_version_); 399 << QuicVersionToString(quic_version_);
400 return kNoPacket; 400 return kNoPacket;
401 } 401 }
402 // Ping has no payload. 402 // Ping has no payload.
403 break; 403 break;
404 case RST_STREAM_FRAME: 404 case RST_STREAM_FRAME:
405 if (!AppendRstStreamFrame(*frame.rst_stream_frame, &writer)) { 405 if (!AppendRstStreamFrame(*frame.rst_stream_frame, &writer)) {
406 LOG(DFATAL) << "AppendRstStreamFrame failed"; 406 LOG(DFATAL) << "AppendRstStreamFrame failed";
407 return kNoPacket; 407 return kNoPacket;
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 return RaiseError(QUIC_INVALID_STOP_WAITING_DATA); 1229 return RaiseError(QUIC_INVALID_STOP_WAITING_DATA);
1230 } 1230 }
1231 if (!visitor_->OnStopWaitingFrame(stop_waiting_frame)) { 1231 if (!visitor_->OnStopWaitingFrame(stop_waiting_frame)) {
1232 DVLOG(1) << "Visitor asked to stop further processing."; 1232 DVLOG(1) << "Visitor asked to stop further processing.";
1233 // Returning true since there was no parsing error. 1233 // Returning true since there was no parsing error.
1234 return true; 1234 return true;
1235 } 1235 }
1236 continue; 1236 continue;
1237 } 1237 }
1238 case PING_FRAME: { 1238 case PING_FRAME: {
1239 if (quic_version_ <= QUIC_VERSION_17) { 1239 if (quic_version_ <= QUIC_VERSION_16) {
1240 LOG(DFATAL) << "Trying to read a Ping in " 1240 LOG(DFATAL) << "Trying to read a Ping in "
1241 << QuicVersionToString(quic_version_); 1241 << QuicVersionToString(quic_version_);
1242 return RaiseError(QUIC_INTERNAL_ERROR); 1242 return RaiseError(QUIC_INTERNAL_ERROR);
1243 } 1243 }
1244 // Ping has no payload. 1244 // Ping has no payload.
1245 QuicPingFrame ping_frame; 1245 QuicPingFrame ping_frame;
1246 if (!visitor_->OnPingFrame(ping_frame)) { 1246 if (!visitor_->OnPingFrame(ping_frame)) {
1247 DVLOG(1) << "Visitor asked to stop further processing."; 1247 DVLOG(1) << "Visitor asked to stop further processing.";
1248 // Returning true since there was no parsing error. 1248 // Returning true since there was no parsing error.
1249 return true; 1249 return true;
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 2337
2338 bool QuicFramer::RaiseError(QuicErrorCode error) { 2338 bool QuicFramer::RaiseError(QuicErrorCode error) {
2339 DVLOG(1) << "Error detail: " << detailed_error_; 2339 DVLOG(1) << "Error detail: " << detailed_error_;
2340 set_error(error); 2340 set_error(error);
2341 visitor_->OnError(this); 2341 visitor_->OnError(this);
2342 reader_.reset(NULL); 2342 reader_.reset(NULL);
2343 return false; 2343 return false;
2344 } 2344 }
2345 2345
2346 } // namespace net 2346 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698