| 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 <limits> | 8 #include <limits> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 std::unique_ptr<base::Value> NetLogQuicPacketHeaderCallback( | 87 std::unique_ptr<base::Value> NetLogQuicPacketHeaderCallback( |
| 88 const QuicPacketHeader* header, | 88 const QuicPacketHeader* header, |
| 89 NetLogCaptureMode /* capture_mode */) { | 89 NetLogCaptureMode /* capture_mode */) { |
| 90 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 90 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 91 dict->SetString("connection_id", | 91 dict->SetString("connection_id", |
| 92 base::Uint64ToString(header->public_header.connection_id)); | 92 base::Uint64ToString(header->public_header.connection_id)); |
| 93 dict->SetInteger("reset_flag", header->public_header.reset_flag); | 93 dict->SetInteger("reset_flag", header->public_header.reset_flag); |
| 94 dict->SetInteger("version_flag", header->public_header.version_flag); | 94 dict->SetInteger("version_flag", header->public_header.version_flag); |
| 95 dict->SetString("packet_number", base::Uint64ToString(header->packet_number)); | 95 dict->SetString("packet_number", base::Uint64ToString(header->packet_number)); |
| 96 dict->SetInteger("entropy_flag", header->entropy_flag); | |
| 97 dict->SetInteger("fec_flag", header->fec_flag); | |
| 98 return std::move(dict); | 96 return std::move(dict); |
| 99 } | 97 } |
| 100 | 98 |
| 101 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( | 99 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( |
| 102 const QuicStreamFrame* frame, | 100 const QuicStreamFrame* frame, |
| 103 NetLogCaptureMode /* capture_mode */) { | 101 NetLogCaptureMode /* capture_mode */) { |
| 104 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 102 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 105 dict->SetInteger("stream_id", frame->stream_id); | 103 dict->SetInteger("stream_id", frame->stream_id); |
| 106 dict->SetBoolean("fin", frame->fin); | 104 dict->SetBoolean("fin", frame->fin); |
| 107 dict->SetString("offset", base::Uint64ToString(frame->offset)); | 105 dict->SetString("offset", base::Uint64ToString(frame->offset)); |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 continue; | 887 continue; |
| 890 } | 888 } |
| 891 // Record some overlapping patterns, to get a better picture, since this is | 889 // Record some overlapping patterns, to get a better picture, since this is |
| 892 // not very expensive. | 890 // not very expensive. |
| 893 if (i % 3 == 0) | 891 if (i % 3 == 0) |
| 894 six_packet_histogram->Add(recent_6_mask); | 892 six_packet_histogram->Add(recent_6_mask); |
| 895 } | 893 } |
| 896 } | 894 } |
| 897 | 895 |
| 898 } // namespace net | 896 } // namespace net |
| OLD | NEW |