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

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

Issue 23691073: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compiler/unittests fix Created 7 years, 3 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_connection_test.cc ('k') | net/quic/quic_packet_creator.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 "net/quic/crypto/quic_decrypter.h" 8 #include "net/quic/crypto/quic_decrypter.h"
9 #include "net/quic/crypto/quic_encrypter.h" 9 #include "net/quic/crypto/quic_encrypter.h"
10 #include "net/quic/quic_data_reader.h" 10 #include "net/quic/quic_data_reader.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 1033
1034 set_detailed_error("Illegal frame type."); 1034 set_detailed_error("Illegal frame type.");
1035 DLOG(WARNING) << "Illegal frame type: " 1035 DLOG(WARNING) << "Illegal frame type: "
1036 << static_cast<int>(frame_type); 1036 << static_cast<int>(frame_type);
1037 return RaiseError(QUIC_INVALID_FRAME_DATA); 1037 return RaiseError(QUIC_INVALID_FRAME_DATA);
1038 } 1038 }
1039 } else { 1039 } else {
1040 // TODO(jri): Retain this else block when support for 1040 // TODO(jri): Retain this else block when support for
1041 // QUIC version < 10 removed. Remove above if block. 1041 // QUIC version < 10 removed. Remove above if block.
1042 1042
1043 // Special frame type processing for QUIC version >= 10 1043 // Special frame type processing for QUIC version >= 10.
1044 if (frame_type & kQuicFrameTypeSpecialMask) { 1044 if (frame_type & kQuicFrameTypeSpecialMask) {
1045 // Stream Frame 1045 // Stream Frame
1046 if (frame_type & kQuicFrameTypeStreamMask) { 1046 if (frame_type & kQuicFrameTypeStreamMask) {
1047 QuicStreamFrame frame; 1047 QuicStreamFrame frame;
1048 if (!ProcessStreamFrame(frame_type, &frame)) { 1048 if (!ProcessStreamFrame(frame_type, &frame)) {
1049 return RaiseError(QUIC_INVALID_STREAM_DATA); 1049 return RaiseError(QUIC_INVALID_STREAM_DATA);
1050 } 1050 }
1051 if (!visitor_->OnStreamFrame(frame)) { 1051 if (!visitor_->OnStreamFrame(frame)) {
1052 DLOG(INFO) << "Visitor asked to stop further processing."; 1052 DLOG(INFO) << "Visitor asked to stop further processing.";
1053 // Returning true since there was no parsing error. 1053 // Returning true since there was no parsing error.
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 2042
2043 bool QuicFramer::RaiseError(QuicErrorCode error) { 2043 bool QuicFramer::RaiseError(QuicErrorCode error) {
2044 DLOG(INFO) << detailed_error_; 2044 DLOG(INFO) << detailed_error_;
2045 set_error(error); 2045 set_error(error);
2046 visitor_->OnError(this); 2046 visitor_->OnError(this);
2047 reader_.reset(NULL); 2047 reader_.reset(NULL);
2048 return false; 2048 return false;
2049 } 2049 }
2050 2050
2051 } // namespace net 2051 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698