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

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

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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/quic_connection_stats.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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 net_log_.AddEvent( 348 net_log_.AddEvent(
349 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT, 349 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT,
350 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame)); 350 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame));
351 break; 351 break;
352 case ACK_FRAME: { 352 case ACK_FRAME: {
353 net_log_.AddEvent( 353 net_log_.AddEvent(
354 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT, 354 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT,
355 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame)); 355 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame));
356 const PacketNumberQueue& missing_packets = 356 const PacketNumberQueue& missing_packets =
357 frame.ack_frame->missing_packets; 357 frame.ack_frame->missing_packets;
358 const uint8 max_ranges = std::numeric_limits<uint8>::max(); 358 const uint8_t max_ranges = std::numeric_limits<uint8_t>::max();
359 // Compute an upper bound on the number of NACK ranges. If the bound 359 // Compute an upper bound on the number of NACK ranges. If the bound
360 // is below the max, then it clearly isn't truncated. 360 // is below the max, then it clearly isn't truncated.
361 if (missing_packets.NumPacketsSlow() < max_ranges || 361 if (missing_packets.NumPacketsSlow() < max_ranges ||
362 (missing_packets.Max() - missing_packets.Min() - 362 (missing_packets.Max() - missing_packets.Min() -
363 missing_packets.NumPacketsSlow() + 1) < max_ranges) { 363 missing_packets.NumPacketsSlow() + 1) < max_ranges) {
364 break; 364 break;
365 } 365 }
366 size_t num_ranges = 0; 366 size_t num_ranges = 0;
367 QuicPacketNumber last_missing = 0; 367 QuicPacketNumber last_missing = 0;
368 for (QuicPacketNumber packet : missing_packets) { 368 for (QuicPacketNumber packet : missing_packets) {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 continue; 872 continue;
873 } 873 }
874 // Record some overlapping patterns, to get a better picture, since this is 874 // Record some overlapping patterns, to get a better picture, since this is
875 // not very expensive. 875 // not very expensive.
876 if (i % 3 == 0) 876 if (i % 3 == 0)
877 six_packet_histogram->Add(recent_6_mask); 877 six_packet_histogram->Add(recent_6_mask);
878 } 878 }
879 } 879 }
880 880
881 } // namespace net 881 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.h ('k') | net/quic/quic_connection_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698