OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 dict->SetInteger("stream_id", frame->stream_id); | 95 dict->SetInteger("stream_id", frame->stream_id); |
96 dict->SetBoolean("fin", frame->fin); | 96 dict->SetBoolean("fin", frame->fin); |
97 dict->SetString("offset", base::Uint64ToString(frame->offset)); | 97 dict->SetString("offset", base::Uint64ToString(frame->offset)); |
98 dict->SetInteger("length", frame->data.TotalBufferSize()); | 98 dict->SetInteger("length", frame->data.TotalBufferSize()); |
99 return dict; | 99 return dict; |
100 } | 100 } |
101 | 101 |
102 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, | 102 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, |
103 NetLog::LogLevel /* log_level */) { | 103 NetLog::LogLevel /* log_level */) { |
104 base::DictionaryValue* dict = new base::DictionaryValue(); | 104 base::DictionaryValue* dict = new base::DictionaryValue(); |
105 base::DictionaryValue* sent_info = new base::DictionaryValue(); | |
106 dict->Set("sent_info", sent_info); | |
107 sent_info->SetString("least_unacked", | |
108 base::Uint64ToString(frame->sent_info.least_unacked)); | |
109 base::DictionaryValue* received_info = new base::DictionaryValue(); | 105 base::DictionaryValue* received_info = new base::DictionaryValue(); |
110 dict->Set("received_info", received_info); | 106 dict->Set("received_info", received_info); |
111 received_info->SetString( | 107 received_info->SetString( |
112 "largest_observed", | 108 "largest_observed", |
113 base::Uint64ToString(frame->received_info.largest_observed)); | 109 base::Uint64ToString(frame->received_info.largest_observed)); |
114 received_info->SetBoolean("truncated", frame->received_info.is_truncated); | 110 received_info->SetBoolean("truncated", frame->received_info.is_truncated); |
115 base::ListValue* missing = new base::ListValue(); | 111 base::ListValue* missing = new base::ListValue(); |
116 received_info->Set("missing_packets", missing); | 112 received_info->Set("missing_packets", missing); |
117 const SequenceNumberSet& missing_packets = | 113 const SequenceNumberSet& missing_packets = |
118 frame->received_info.missing_packets; | 114 frame->received_info.missing_packets; |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 continue; | 828 continue; |
833 } | 829 } |
834 // Record some overlapping patterns, to get a better picture, since this is | 830 // Record some overlapping patterns, to get a better picture, since this is |
835 // not very expensive. | 831 // not very expensive. |
836 if (i % 3 == 0) | 832 if (i % 3 == 0) |
837 six_packet_histogram->Add(recent_6_mask); | 833 six_packet_histogram->Add(recent_6_mask); |
838 } | 834 } |
839 } | 835 } |
840 | 836 |
841 } // namespace net | 837 } // namespace net |
OLD | NEW |