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

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

Issue 12334063: Land recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more EXPECT_FALSE Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection_helper_test.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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 12 matching lines...) Expand all
23 dict->SetString("peer_address", peer_address->ToString()); 23 dict->SetString("peer_address", peer_address->ToString());
24 dict->SetInteger("size", packet_size); 24 dict->SetInteger("size", packet_size);
25 return dict; 25 return dict;
26 } 26 }
27 27
28 Value* NetLogQuicPacketHeaderCallback(const QuicPacketHeader* header, 28 Value* NetLogQuicPacketHeaderCallback(const QuicPacketHeader* header,
29 NetLog::LogLevel /* log_level */) { 29 NetLog::LogLevel /* log_level */) {
30 DictionaryValue* dict = new DictionaryValue(); 30 DictionaryValue* dict = new DictionaryValue();
31 dict->SetString("guid", 31 dict->SetString("guid",
32 base::Uint64ToString(header->public_header.guid)); 32 base::Uint64ToString(header->public_header.guid));
33 dict->SetInteger("public_flags", header->public_header.flags); 33 dict->SetInteger("reset_flag", header->public_header.reset_flag);
34 dict->SetInteger("version_flag", header->public_header.version_flag);
34 dict->SetString("packet_sequence_number", 35 dict->SetString("packet_sequence_number",
35 base::Uint64ToString(header->packet_sequence_number)); 36 base::Uint64ToString(header->packet_sequence_number));
36 dict->SetInteger("private_flags", header->private_flags); 37 dict->SetInteger("entropy_flag", header->entropy_flag);
38 dict->SetInteger("fec_flag", header->fec_flag);
39 dict->SetInteger("fec_entropy_flag", header->fec_entropy_flag);
37 dict->SetInteger("fec_group", header->fec_group); 40 dict->SetInteger("fec_group", header->fec_group);
38 return dict; 41 return dict;
39 } 42 }
40 43
41 Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame, 44 Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame,
42 NetLog::LogLevel /* log_level */) { 45 NetLog::LogLevel /* log_level */) {
43 DictionaryValue* dict = new DictionaryValue(); 46 DictionaryValue* dict = new DictionaryValue();
44 dict->SetInteger("stream_id", frame->stream_id); 47 dict->SetInteger("stream_id", frame->stream_id);
45 dict->SetBoolean("fin", frame->fin); 48 dict->SetBoolean("fin", frame->fin);
46 dict->SetString("offset", base::Uint64ToString(frame->offset)); 49 dict->SetString("offset", base::Uint64ToString(frame->offset));
47 dict->SetInteger("length", frame->data.length()); 50 dict->SetInteger("length", frame->data.length());
48 return dict; 51 return dict;
49 } 52 }
50 53
51 Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, 54 Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame,
52 NetLog::LogLevel /* log_level */) { 55 NetLog::LogLevel /* log_level */) {
53 DictionaryValue* dict = new DictionaryValue(); 56 DictionaryValue* dict = new DictionaryValue();
54 DictionaryValue* sent_info = new DictionaryValue(); 57 DictionaryValue* sent_info = new DictionaryValue();
55 dict->Set("sent_info", sent_info); 58 dict->Set("sent_info", sent_info);
56 sent_info->SetString("least_unacked", 59 sent_info->SetString("least_unacked",
57 base::Uint64ToString(frame->sent_info.least_unacked)); 60 base::Uint64ToString(frame->sent_info.least_unacked));
58 DictionaryValue* received_info = new DictionaryValue(); 61 DictionaryValue* received_info = new DictionaryValue();
59 dict->Set("received_info", received_info); 62 dict->Set("received_info", received_info);
60 received_info->SetString( 63 received_info->SetString(
61 "largest_observed", 64 "largest_observed",
62 base::Uint64ToString(frame->received_info.largest_observed)); 65 base::Uint64ToString(frame->received_info.largest_observed));
63 ListValue* missing = new ListValue(); 66 ListValue* missing = new ListValue();
64 received_info->Set("missing_packets", missing); 67 received_info->Set("missing_packets", missing);
65 const SequenceSet& missing_packets = frame->received_info.missing_packets; 68 const SequenceNumberSet& missing_packets =
66 for (SequenceSet::const_iterator it = missing_packets.begin(); 69 frame->received_info.missing_packets;
70 for (SequenceNumberSet::const_iterator it = missing_packets.begin();
67 it != missing_packets.end(); ++it) { 71 it != missing_packets.end(); ++it) {
68 missing->Append(new base::StringValue(base::Uint64ToString(*it))); 72 missing->Append(new base::StringValue(base::Uint64ToString(*it)));
69 } 73 }
70 return dict; 74 return dict;
71 } 75 }
72 76
73 Value* NetLogQuicCongestionFeedbackFrameCallback( 77 Value* NetLogQuicCongestionFeedbackFrameCallback(
74 const QuicCongestionFeedbackFrame* frame, 78 const QuicCongestionFeedbackFrame* frame,
75 NetLog::LogLevel /* log_level */) { 79 NetLog::LogLevel /* log_level */) {
76 DictionaryValue* dict = new DictionaryValue(); 80 DictionaryValue* dict = new DictionaryValue();
(...skipping 26 matching lines...) Expand all
103 break; 107 break;
104 } 108 }
105 109
106 return dict; 110 return dict;
107 } 111 }
108 112
109 Value* NetLogQuicRstStreamFrameCallback(const QuicRstStreamFrame* frame, 113 Value* NetLogQuicRstStreamFrameCallback(const QuicRstStreamFrame* frame,
110 NetLog::LogLevel /* log_level */) { 114 NetLog::LogLevel /* log_level */) {
111 DictionaryValue* dict = new DictionaryValue(); 115 DictionaryValue* dict = new DictionaryValue();
112 dict->SetInteger("stream_id", frame->stream_id); 116 dict->SetInteger("stream_id", frame->stream_id);
113 dict->SetInteger("offset", frame->offset);
114 dict->SetInteger("error_code", frame->error_code); 117 dict->SetInteger("error_code", frame->error_code);
115 dict->SetString("details", frame->error_details); 118 dict->SetString("details", frame->error_details);
116 return dict; 119 return dict;
117 } 120 }
118 121
119 Value* NetLogQuicConnectionCloseFrameCallback( 122 Value* NetLogQuicConnectionCloseFrameCallback(
120 const QuicConnectionCloseFrame* frame, 123 const QuicConnectionCloseFrame* frame,
121 NetLog::LogLevel /* log_level */) { 124 NetLog::LogLevel /* log_level */) {
122 DictionaryValue* dict = new DictionaryValue(); 125 DictionaryValue* dict = new DictionaryValue();
123 dict->SetInteger("error_code", frame->error_code); 126 dict->SetInteger("error_code", frame->error_code);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void QuicConnectionLogger::OnPublicResetPacket( 188 void QuicConnectionLogger::OnPublicResetPacket(
186 const QuicPublicResetPacket& packet) { 189 const QuicPublicResetPacket& packet) {
187 } 190 }
188 191
189 void QuicConnectionLogger::OnRevivedPacket( 192 void QuicConnectionLogger::OnRevivedPacket(
190 const QuicPacketHeader& revived_header, 193 const QuicPacketHeader& revived_header,
191 base::StringPiece payload) { 194 base::StringPiece payload) {
192 } 195 }
193 196
194 } // namespace net 197 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_helper_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698