| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return std::move(dict); | 97 return std::move(dict); |
| 98 } | 98 } |
| 99 | 99 |
| 100 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( | 100 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback( |
| 101 const QuicStreamFrame* frame, | 101 const QuicStreamFrame* frame, |
| 102 NetLogCaptureMode /* capture_mode */) { | 102 NetLogCaptureMode /* capture_mode */) { |
| 103 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 103 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 104 dict->SetInteger("stream_id", frame->stream_id); | 104 dict->SetInteger("stream_id", frame->stream_id); |
| 105 dict->SetBoolean("fin", frame->fin); | 105 dict->SetBoolean("fin", frame->fin); |
| 106 dict->SetString("offset", base::Uint64ToString(frame->offset)); | 106 dict->SetString("offset", base::Uint64ToString(frame->offset)); |
| 107 dict->SetInteger("length", frame->frame_length); | 107 dict->SetInteger("length", frame->data_length); |
| 108 return std::move(dict); | 108 return std::move(dict); |
| 109 } | 109 } |
| 110 | 110 |
| 111 std::unique_ptr<base::Value> NetLogQuicAckFrameCallback( | 111 std::unique_ptr<base::Value> NetLogQuicAckFrameCallback( |
| 112 const QuicAckFrame* frame, | 112 const QuicAckFrame* frame, |
| 113 NetLogCaptureMode /* capture_mode */) { | 113 NetLogCaptureMode /* capture_mode */) { |
| 114 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 114 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 115 dict->SetString("largest_observed", | 115 dict->SetString("largest_observed", |
| 116 base::Uint64ToString(frame->largest_observed)); | 116 base::Uint64ToString(frame->largest_observed)); |
| 117 dict->SetString("delta_time_largest_observed_us", | 117 dict->SetString("delta_time_largest_observed_us", |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 continue; | 874 continue; |
| 875 } | 875 } |
| 876 // Record some overlapping patterns, to get a better picture, since this is | 876 // Record some overlapping patterns, to get a better picture, since this is |
| 877 // not very expensive. | 877 // not very expensive. |
| 878 if (i % 3 == 0) | 878 if (i % 3 == 0) |
| 879 six_packet_histogram->Add(recent_6_mask); | 879 six_packet_histogram->Add(recent_6_mask); |
| 880 } | 880 } |
| 881 } | 881 } |
| 882 | 882 |
| 883 } // namespace net | 883 } // namespace net |
| OLD | NEW |