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

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

Issue 761863002: Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More work Created 6 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
OLDNEW
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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (stats.min_rtt_us > 0) { 311 if (stats.min_rtt_us > 0) {
312 reordering = static_cast<base::HistogramBase::Sample>( 312 reordering = static_cast<base::HistogramBase::Sample>(
313 100 * stats.max_time_reordering_us / stats.min_rtt_us); 313 100 * stats.max_time_reordering_us / stats.min_rtt_us);
314 } 314 }
315 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", 315 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime",
316 reordering, 0, kMaxReordering, 50); 316 reordering, 0, kMaxReordering, 50);
317 if (stats.min_rtt_us > 100 * 1000) { 317 if (stats.min_rtt_us > 100 * 1000) {
318 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", 318 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt",
319 reordering, 0, kMaxReordering, 50); 319 reordering, 0, kMaxReordering, 50);
320 } 320 }
321 UMA_HISTOGRAM_COUNTS("Net.QuicSession.MaxReordering", 321 UMA_HISTOGRAM_COUNTS(
322 stats.max_sequence_reordering); 322 "Net.QuicSession.MaxReordering",
323 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering));
323 } 324 }
324 325
325 void QuicClientSession::OnStreamFrames( 326 void QuicClientSession::OnStreamFrames(
326 const std::vector<QuicStreamFrame>& frames) { 327 const std::vector<QuicStreamFrame>& frames) {
327 // Record total number of stream frames. 328 // Record total number of stream frames.
328 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); 329 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size());
329 330
330 // Record number of frames per stream in packet. 331 // Record number of frames per stream in packet.
331 typedef std::map<QuicStreamId, size_t> FrameCounter; 332 typedef std::map<QuicStreamId, size_t> FrameCounter;
332 FrameCounter frames_per_stream; 333 FrameCounter frames_per_stream;
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return; 934 return;
934 935
935 // TODO(rch): re-enable this code once beta is cut. 936 // TODO(rch): re-enable this code once beta is cut.
936 // if (stream_factory_) 937 // if (stream_factory_)
937 // stream_factory_->OnSessionConnectTimeout(this); 938 // stream_factory_->OnSessionConnectTimeout(this);
938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 939 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
939 // DCHECK_EQ(0u, GetNumOpenStreams()); 940 // DCHECK_EQ(0u, GetNumOpenStreams());
940 } 941 }
941 942
942 } // namespace net 943 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698