Chromium Code Reviews| Index: net/quic/quic_connection.cc |
| diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
| index 43442265e560d8f8decf11503f35227231aeada3..cefd37b81a1b3739e0b1b1bec12d5c8b5bc705a5 100644 |
| --- a/net/quic/quic_connection.cc |
| +++ b/net/quic/quic_connection.cc |
| @@ -790,9 +790,12 @@ bool QuicConnection::OnPingFrame(const QuicPingFrame& frame) { |
| const char* QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) { |
| if (incoming_ack.largest_observed > packet_generator_.packet_number()) { |
| - LOG(WARNING) << ENDPOINT << "Peer's observed unsent packet:" |
| - << incoming_ack.largest_observed << " vs " |
| - << packet_generator_.packet_number(); |
| + // clang-format off |
|
Ryan Hamilton
2016/02/02 04:33:19
Why clang-format off?
ramant (doing other things)
2016/02/02 05:08:25
Added it to keep code in sync with internal code.
Ryan Hamilton
2016/02/02 05:23:26
Hm. I'm not in love with that. We could define LOG
ramant (doing other things)
2016/02/02 06:42:10
Reverted the clang-format statements.
+1 to addin
|
| + LOG(WARNING) |
| + << ENDPOINT |
| + << "Peer's observed unsent packet:" << incoming_ack.largest_observed |
| + << " vs " << packet_generator_.packet_number(); |
| + // clang-format on |
| // We got an error for data we have not sent. Error out. |
| return "Largest observed too high"; |
| } |
| @@ -808,35 +811,49 @@ const char* QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) { |
| if (!incoming_ack.missing_packets.Empty() && |
| incoming_ack.missing_packets.Max() > incoming_ack.largest_observed) { |
| - LOG(WARNING) << ENDPOINT << "Peer sent missing packet: " |
| - << incoming_ack.missing_packets.Max() |
| - << " which is greater than largest observed: " |
| - << incoming_ack.largest_observed; |
| + // clang-format off |
| + LOG(WARNING) |
| + << ENDPOINT |
| + << "Peer sent missing packet: " << incoming_ack.missing_packets.Max() |
| + << " which is greater than largest observed: " |
| + << incoming_ack.largest_observed; |
| + // clang-format on |
| return "Missing packet higher than largest observed"; |
| } |
| if (!incoming_ack.missing_packets.Empty() && |
| incoming_ack.missing_packets.Min() < |
| sent_packet_manager_.least_packet_awaited_by_peer()) { |
| - LOG(WARNING) << ENDPOINT << "Peer sent missing packet: " |
| - << incoming_ack.missing_packets.Min() |
| - << " which is smaller than least_packet_awaited_by_peer_: " |
| - << sent_packet_manager_.least_packet_awaited_by_peer(); |
| + // clang-format off |
| + LOG(WARNING) |
| + << ENDPOINT |
| + << "Peer sent missing packet: " << incoming_ack.missing_packets.Min() |
| + << " which is smaller than least_packet_awaited_by_peer_: " |
| + << sent_packet_manager_.least_packet_awaited_by_peer(); |
| + // clang-format on |
| return "Missing packet smaller than least awaited"; |
| } |
| if (!sent_entropy_manager_.IsValidEntropy(incoming_ack.largest_observed, |
| incoming_ack.missing_packets, |
| incoming_ack.entropy_hash)) { |
| - LOG(WARNING) << ENDPOINT << "Peer sent invalid entropy."; |
| + // clang-format off |
| + LOG(WARNING) |
| + << ENDPOINT << "Peer sent invalid entropy." |
| + << " largest_observed:" << incoming_ack.largest_observed |
| + << " last_received:" << last_header_.packet_number; |
| + // clang-format on |
| return "Invalid entropy"; |
| } |
| if (incoming_ack.latest_revived_packet != 0 && |
| !incoming_ack.missing_packets.Contains( |
| incoming_ack.latest_revived_packet)) { |
| - LOG(WARNING) << ENDPOINT |
| - << "Peer specified revived packet which was not missing."; |
| + // clang-format off |
| + LOG(WARNING) |
| + << ENDPOINT << "Peer specified revived packet which was not missing." |
| + << " revived_packet:" << incoming_ack.latest_revived_packet; |
| + // clang-format on |
| return "Invalid revived packet"; |
| } |
| return nullptr; |