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

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

Issue 478153003: Change the wire format of the ack frame to include a compressed version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT and pass clock to QuicTestPacketMaker and use it in AckPacket Created 6 years, 3 months 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.cc ('k') | net/quic/quic_connection_test.cc » ('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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 missing->AppendString(base::Uint64ToString(*it)); 115 missing->AppendString(base::Uint64ToString(*it));
116 } 116 }
117 return dict; 117 return dict;
118 } 118 }
119 119
120 base::Value* NetLogQuicCongestionFeedbackFrameCallback( 120 base::Value* NetLogQuicCongestionFeedbackFrameCallback(
121 const QuicCongestionFeedbackFrame* frame, 121 const QuicCongestionFeedbackFrame* frame,
122 NetLog::LogLevel /* log_level */) { 122 NetLog::LogLevel /* log_level */) {
123 base::DictionaryValue* dict = new base::DictionaryValue(); 123 base::DictionaryValue* dict = new base::DictionaryValue();
124 switch (frame->type) { 124 switch (frame->type) {
125 case kTimestamp: {
126 dict->SetString("type", "Timestamp");
127 base::ListValue* received = new base::ListValue();
128 dict->Set("received_packets", received);
129 for (TimeMap::const_iterator it =
130 frame->timestamp.received_packet_times.begin();
131 it != frame->timestamp.received_packet_times.end(); ++it) {
132 string value = base::Uint64ToString(it->first) + "@" +
133 base::Uint64ToString(it->second.ToDebuggingValue());
134 received->AppendString(value);
135 }
136 break;
137 }
138 case kTCP: 125 case kTCP:
139 dict->SetString("type", "TCP"); 126 dict->SetString("type", "TCP");
140 dict->SetInteger("receive_window", frame->tcp.receive_window); 127 dict->SetInteger("receive_window", frame->tcp.receive_window);
141 break; 128 break;
142 } 129 }
143 130
144 return dict; 131 return dict;
145 } 132 }
146 133
147 base::Value* NetLogQuicRstStreamFrameCallback( 134 base::Value* NetLogQuicRstStreamFrameCallback(
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 continue; 852 continue;
866 } 853 }
867 // Record some overlapping patterns, to get a better picture, since this is 854 // Record some overlapping patterns, to get a better picture, since this is
868 // not very expensive. 855 // not very expensive.
869 if (i % 3 == 0) 856 if (i % 3 == 0)
870 six_packet_histogram->Add(recent_6_mask); 857 six_packet_histogram->Add(recent_6_mask);
871 } 858 }
872 } 859 }
873 860
874 } // namespace net 861 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698