| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 dict->SetInteger("fec_group", header->fec_group); | 73 dict->SetInteger("fec_group", header->fec_group); |
| 74 return dict; | 74 return dict; |
| 75 } | 75 } |
| 76 | 76 |
| 77 base::Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame, | 77 base::Value* NetLogQuicStreamFrameCallback(const QuicStreamFrame* frame, |
| 78 NetLog::LogLevel /* log_level */) { | 78 NetLog::LogLevel /* log_level */) { |
| 79 base::DictionaryValue* dict = new base::DictionaryValue(); | 79 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 80 dict->SetInteger("stream_id", frame->stream_id); | 80 dict->SetInteger("stream_id", frame->stream_id); |
| 81 dict->SetBoolean("fin", frame->fin); | 81 dict->SetBoolean("fin", frame->fin); |
| 82 dict->SetString("offset", base::Uint64ToString(frame->offset)); | 82 dict->SetString("offset", base::Uint64ToString(frame->offset)); |
| 83 dict->SetInteger("length", frame->data.Size()); | 83 dict->SetInteger("length", frame->data.TotalBufferSize()); |
| 84 return dict; | 84 return dict; |
| 85 } | 85 } |
| 86 | 86 |
| 87 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, | 87 base::Value* NetLogQuicAckFrameCallback(const QuicAckFrame* frame, |
| 88 NetLog::LogLevel /* log_level */) { | 88 NetLog::LogLevel /* log_level */) { |
| 89 base::DictionaryValue* dict = new base::DictionaryValue(); | 89 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 90 base::DictionaryValue* sent_info = new base::DictionaryValue(); | 90 base::DictionaryValue* sent_info = new base::DictionaryValue(); |
| 91 dict->Set("sent_info", sent_info); | 91 dict->Set("sent_info", sent_info); |
| 92 sent_info->SetString("least_unacked", | 92 sent_info->SetString("least_unacked", |
| 93 base::Uint64ToString(frame->sent_info.least_unacked)); | 93 base::Uint64ToString(frame->sent_info.least_unacked)); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 | 425 |
| 426 void QuicConnectionLogger::OnSuccessfulVersionNegotiation( | 426 void QuicConnectionLogger::OnSuccessfulVersionNegotiation( |
| 427 const QuicVersion& version) { | 427 const QuicVersion& version) { |
| 428 string quic_version = QuicVersionToString(version); | 428 string quic_version = QuicVersionToString(version); |
| 429 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATED, | 429 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATED, |
| 430 NetLog::StringCallback("version", &quic_version)); | 430 NetLog::StringCallback("version", &quic_version)); |
| 431 } | 431 } |
| 432 | 432 |
| 433 } // namespace net | 433 } // namespace net |
| OLD | NEW |