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

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

Issue 99453002: Use TotalBufferSize instead of Size when logging the length of a data frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 dict->SetInteger("fec_group", header->fec_group); 73 dict->SetInteger("fec_group", header->fec_group);
74 return dict; 74 return dict;
75 } 75 }
76 76
77 base::Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame, 77 base::Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame,
78 NetLog::LogLevel /* log_level */) { 78 NetLog::LogLevel /* log_level */) {
79 base::DictionaryValue* dict = new base::DictionaryValue(); 79 base::DictionaryValue* dict = new base::DictionaryValue();
80 dict->SetInteger("stream_id", frame->stream_id); 80 dict->SetInteger("stream_id", frame->stream_id);
81 dict->SetBoolean("fin", frame->fin); 81 dict->SetBoolean("fin", frame->fin);
82 dict->SetString("offset", base::Uint64ToString(frame->offset)); 82 dict->SetString("offset", base::Uint64ToString(frame->offset));
83 dict->SetInteger("length", frame->data.Size()); 83 dict->SetInteger("length", frame->data.TotalBufferSize());
84 return dict; 84 return dict;
85 } 85 }
86 86
87 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, 87 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame,
88 NetLog::LogLevel /* log_level */) { 88 NetLog::LogLevel /* log_level */) {
89 base::DictionaryValue* dict = new base::DictionaryValue(); 89 base::DictionaryValue* dict = new base::DictionaryValue();
90 base::DictionaryValue* sent_info = new base::DictionaryValue(); 90 base::DictionaryValue* sent_info = new base::DictionaryValue();
91 dict->Set("sent_info", sent_info); 91 dict->Set("sent_info", sent_info);
92 sent_info->SetString("least_unacked", 92 sent_info->SetString("least_unacked",
93 base::Uint64ToString(frame->sent_info.least_unacked)); 93 base::Uint64ToString(frame->sent_info.least_unacked));
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 void QuicConnectionLogger::OnSuccessfulVersionNegotiation( 426 void QuicConnectionLogger::OnSuccessfulVersionNegotiation(
427 const QuicVersion& version) { 427 const QuicVersion& version) {
428 string quic_version = QuicVersionToString(version); 428 string quic_version = QuicVersionToString(version);
429 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATED, 429 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATED,
430 NetLog::StringCallback("version", &quic_version)); 430 NetLog::StringCallback("version", &quic_version));
431 } 431 }
432 432
433 } // namespace net 433 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698