| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const QuicPacketHeader* header, | 86 const QuicPacketHeader* header, |
| 87 NetLogCaptureMode /* capture_mode */) { | 87 NetLogCaptureMode /* capture_mode */) { |
| 88 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 88 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 89 dict->SetString("connection_id", | 89 dict->SetString("connection_id", |
| 90 base::Uint64ToString(header->public_header.connection_id)); | 90 base::Uint64ToString(header->public_header.connection_id)); |
| 91 dict->SetInteger("reset_flag", header->public_header.reset_flag); | 91 dict->SetInteger("reset_flag", header->public_header.reset_flag); |
| 92 dict->SetInteger("version_flag", header->public_header.version_flag); | 92 dict->SetInteger("version_flag", header->public_header.version_flag); |
| 93 dict->SetString("packet_number", base::Uint64ToString(header->packet_number)); | 93 dict->SetString("packet_number", base::Uint64ToString(header->packet_number)); |
| 94 dict->SetInteger("entropy_flag", header->entropy_flag); | 94 dict->SetInteger("entropy_flag", header->entropy_flag); |
| 95 dict->SetInteger("fec_flag", header->fec_flag); | 95 dict->SetInteger("fec_flag", header->fec_flag); |
| 96 dict->SetInteger("fec_group", static_cast<int>(header->fec_group)); | |
| 97 return std::move(dict); | 96 return std::move(dict); |
| 98 } | 97 } |
| 99 | 98 |
| 100 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( | 99 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( |
| 101 const QuicStreamFrame* frame, | 100 const QuicStreamFrame* frame, |
| 102 NetLogCaptureMode /* capture_mode */) { | 101 NetLogCaptureMode /* capture_mode */) { |
| 103 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 102 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 104 dict->SetInteger("stream_id", frame->stream_id); | 103 dict->SetInteger("stream_id", frame->stream_id); |
| 105 dict->SetBoolean("fin", frame->fin); | 104 dict->SetBoolean("fin", frame->fin); |
| 106 dict->SetString("offset", base::Uint64ToString(frame->offset)); | 105 dict->SetString("offset", base::Uint64ToString(frame->offset)); |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 continue; | 873 continue; |
| 875 } | 874 } |
| 876 // Record some overlapping patterns, to get a better picture, since this is | 875 // Record some overlapping patterns, to get a better picture, since this is |
| 877 // not very expensive. | 876 // not very expensive. |
| 878 if (i % 3 == 0) | 877 if (i % 3 == 0) |
| 879 six_packet_histogram->Add(recent_6_mask); | 878 six_packet_histogram->Add(recent_6_mask); |
| 880 } | 879 } |
| 881 } | 880 } |
| 882 | 881 |
| 883 } // namespace net | 882 } // namespace net |
| OLD | NEW |