| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |