| 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 "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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 DVLOG(1) << "Truncating large frame, free bytes: " << free_bytes; | 316 DVLOG(1) << "Truncating large frame, free bytes: " << free_bytes; |
| 317 return free_bytes; | 317 return free_bytes; |
| 318 } | 318 } |
| 319 if (!FLAGS_quic_allow_oversized_packets_for_test) { | 319 if (!FLAGS_quic_allow_oversized_packets_for_test) { |
| 320 return 0; | 320 return 0; |
| 321 } | 321 } |
| 322 LOG(DFATAL) << "Packet size too small to fit frame."; | 322 LOG(DFATAL) << "Packet size too small to fit frame."; |
| 323 return frame_len; | 323 return frame_len; |
| 324 } | 324 } |
| 325 | 325 |
| 326 QuicFramer::AckFrameInfo::AckFrameInfo() : max_delta(0) { } | 326 QuicFramer::AckFrameInfo::AckFrameInfo() : max_delta(0) {} |
| 327 | 327 |
| 328 QuicFramer::AckFrameInfo::~AckFrameInfo() { } | 328 QuicFramer::AckFrameInfo::~AckFrameInfo() {} |
| 329 | 329 |
| 330 QuicPacketEntropyHash QuicFramer::GetPacketEntropyHash( | 330 QuicPacketEntropyHash QuicFramer::GetPacketEntropyHash( |
| 331 const QuicPacketHeader& header) const { | 331 const QuicPacketHeader& header) const { |
| 332 return header.entropy_flag << (header.packet_sequence_number % 8); | 332 return header.entropy_flag << (header.packet_sequence_number % 8); |
| 333 } | 333 } |
| 334 | 334 |
| 335 SerializedPacket QuicFramer::BuildDataPacket( | 335 SerializedPacket QuicFramer::BuildDataPacket( |
| 336 const QuicPacketHeader& header, | 336 const QuicPacketHeader& header, |
| 337 const QuicFrames& frames, | 337 const QuicFrames& frames, |
| 338 size_t packet_size) { | 338 size_t packet_size) { |
| (...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |