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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 143 } |
144 case kFixRate: | 144 case kFixRate: |
145 dict->SetString("type", "FixRate"); | 145 dict->SetString("type", "FixRate"); |
146 dict->SetInteger("bitrate_in_bytes_per_second", | 146 dict->SetInteger("bitrate_in_bytes_per_second", |
147 frame->fix_rate.bitrate.ToBytesPerSecond()); | 147 frame->fix_rate.bitrate.ToBytesPerSecond()); |
148 break; | 148 break; |
149 case kTCP: | 149 case kTCP: |
150 dict->SetString("type", "TCP"); | 150 dict->SetString("type", "TCP"); |
151 dict->SetInteger("receive_window", frame->tcp.receive_window); | 151 dict->SetInteger("receive_window", frame->tcp.receive_window); |
152 break; | 152 break; |
| 153 case kTCPBBR: |
| 154 dict->SetString("type", "TCPBBR"); |
| 155 // TODO(rtenneti): Add support for BBR. |
| 156 break; |
153 } | 157 } |
154 | 158 |
155 return dict; | 159 return dict; |
156 } | 160 } |
157 | 161 |
158 base::Value* NetLogQuicRstStreamFrameCallback( | 162 base::Value* NetLogQuicRstStreamFrameCallback( |
159 const QuicRstStreamFrame* frame, | 163 const QuicRstStreamFrame* frame, |
160 NetLog::LogLevel /* log_level */) { | 164 NetLog::LogLevel /* log_level */) { |
161 base::DictionaryValue* dict = new base::DictionaryValue(); | 165 base::DictionaryValue* dict = new base::DictionaryValue(); |
162 dict->SetInteger("stream_id", frame->stream_id); | 166 dict->SetInteger("stream_id", frame->stream_id); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 continue; | 783 continue; |
780 } | 784 } |
781 // Record some overlapping patterns, to get a better picture, since this is | 785 // Record some overlapping patterns, to get a better picture, since this is |
782 // not very expensive. | 786 // not very expensive. |
783 if (i % 3 == 0) | 787 if (i % 3 == 0) |
784 six_packet_histogram->Add(recent_6_mask); | 788 six_packet_histogram->Add(recent_6_mask); |
785 } | 789 } |
786 } | 790 } |
787 | 791 |
788 } // namespace net | 792 } // namespace net |
OLD | NEW |