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

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

Issue 1433783004: Replace QuicEncryptedPacket argument in QuicConnectionDebugVisitor::OnPacketSent with an encrypted … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106990301
Patch Set: Fix quic_connection_logger Created 5 years, 1 month 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
« no previous file with comments | « net/quic/quic_connection_logger.h ('k') | net/quic/test_tools/quic_test_utils.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_connection_logger.h" 5 #include "net/quic/quic_connection_logger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 default: 431 default:
432 DCHECK(false) << "Illegal frame type: " << frame.type; 432 DCHECK(false) << "Illegal frame type: " << frame.type;
433 } 433 }
434 } 434 }
435 435
436 void QuicConnectionLogger::OnPacketSent( 436 void QuicConnectionLogger::OnPacketSent(
437 const SerializedPacket& serialized_packet, 437 const SerializedPacket& serialized_packet,
438 QuicPacketNumber original_packet_number, 438 QuicPacketNumber original_packet_number,
439 EncryptionLevel level, 439 EncryptionLevel level,
440 TransmissionType transmission_type, 440 TransmissionType transmission_type,
441 const QuicEncryptedPacket& packet, 441 size_t encrypted_length,
442 QuicTime sent_time) { 442 QuicTime sent_time) {
443 if (original_packet_number == 0) { 443 if (original_packet_number == 0) {
444 net_log_.AddEvent( 444 net_log_.AddEvent(
445 NetLog::TYPE_QUIC_SESSION_PACKET_SENT, 445 NetLog::TYPE_QUIC_SESSION_PACKET_SENT,
446 base::Bind(&NetLogQuicPacketSentCallback, serialized_packet, 446 base::Bind(&NetLogQuicPacketSentCallback, serialized_packet, level,
447 level, transmission_type, packet.length(), sent_time)); 447 transmission_type, encrypted_length, sent_time));
448 } else { 448 } else {
449 net_log_.AddEvent( 449 net_log_.AddEvent(
450 NetLog::TYPE_QUIC_SESSION_PACKET_RETRANSMITTED, 450 NetLog::TYPE_QUIC_SESSION_PACKET_RETRANSMITTED,
451 base::Bind(&NetLogQuicPacketRetransmittedCallback, 451 base::Bind(&NetLogQuicPacketRetransmittedCallback,
452 original_packet_number, serialized_packet.packet_number)); 452 original_packet_number, serialized_packet.packet_number));
453 } 453 }
454 // Record time duration from last packet sent to the new packet sent. 454 // Record time duration from last packet sent to the new packet sent.
455 if (last_packet_sent_time_.IsInitialized()) { 455 if (last_packet_sent_time_.IsInitialized()) {
456 UMA_HISTOGRAM_CUSTOM_TIMES( 456 UMA_HISTOGRAM_CUSTOM_TIMES(
457 "Net.QuicTimeBetweenTwoPacketSent", 457 "Net.QuicTimeBetweenTwoPacketSent",
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 continue; 890 continue;
891 } 891 }
892 // Record some overlapping patterns, to get a better picture, since this is 892 // Record some overlapping patterns, to get a better picture, since this is
893 // not very expensive. 893 // not very expensive.
894 if (i % 3 == 0) 894 if (i % 3 == 0)
895 six_packet_histogram->Add(recent_6_mask); 895 six_packet_histogram->Add(recent_6_mask);
896 } 896 }
897 } 897 }
898 898
899 } // namespace net 899 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698