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/crypto/crypto_handshake_message.h" | 5 #include "net/quic/crypto/crypto_handshake_message.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
10 #include "net/quic/crypto/crypto_protocol.h" | 10 #include "net/quic/crypto/crypto_protocol.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { | 233 string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { |
234 string ret = string(2 * indent, ' ') + QuicUtils::TagToString(tag_) + "<\n"; | 234 string ret = string(2 * indent, ' ') + QuicUtils::TagToString(tag_) + "<\n"; |
235 ++indent; | 235 ++indent; |
236 for (QuicTagValueMap::const_iterator it = tag_value_map_.begin(); | 236 for (QuicTagValueMap::const_iterator it = tag_value_map_.begin(); |
237 it != tag_value_map_.end(); ++it) { | 237 it != tag_value_map_.end(); ++it) { |
238 ret += string(2 * indent, ' ') + QuicUtils::TagToString(it->first) + ": "; | 238 ret += string(2 * indent, ' ') + QuicUtils::TagToString(it->first) + ": "; |
239 | 239 |
240 bool done = false; | 240 bool done = false; |
241 switch (it->first) { | 241 switch (it->first) { |
242 case kICSL: | 242 case kICSL: |
243 case kIFCW: | |
244 case kCFCW: | 243 case kCFCW: |
245 case kSFCW: | 244 case kSFCW: |
246 case kIRTT: | 245 case kIRTT: |
247 case kMSPC: | 246 case kMSPC: |
248 case kSWND: | 247 case kSWND: |
249 // uint32 value | 248 // uint32 value |
250 if (it->second.size() == 4) { | 249 if (it->second.size() == 4) { |
251 uint32 value; | 250 uint32 value; |
252 memcpy(&value, it->second.data(), sizeof(value)); | 251 memcpy(&value, it->second.data(), sizeof(value)); |
253 ret += base::UintToString(value); | 252 ret += base::UintToString(value); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); | 313 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); |
315 } | 314 } |
316 ret += "\n"; | 315 ret += "\n"; |
317 } | 316 } |
318 --indent; | 317 --indent; |
319 ret += string(2 * indent, ' ') + ">"; | 318 ret += string(2 * indent, ' ') + ">"; |
320 return ret; | 319 return ret; |
321 } | 320 } |
322 | 321 |
323 } // namespace net | 322 } // namespace net |
OLD | NEW |