| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 295 |
| 296 done = true; | 296 done = true; |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 break; | 299 break; |
| 300 case kPAD: | 300 case kPAD: |
| 301 ret += StringPrintf("(%d bytes of padding)", | 301 ret += StringPrintf("(%d bytes of padding)", |
| 302 static_cast<int>(it->second.size())); | 302 static_cast<int>(it->second.size())); |
| 303 done = true; | 303 done = true; |
| 304 break; | 304 break; |
| 305 case kSNI: |
| 305 case kUAID: | 306 case kUAID: |
| 306 ret += it->second; | 307 ret += "\"" + it->second + "\""; |
| 307 done = true; | 308 done = true; |
| 308 break; | 309 break; |
| 309 } | 310 } |
| 310 | 311 |
| 311 if (!done) { | 312 if (!done) { |
| 312 // If there's no specific format for this tag, or the value is invalid, | 313 // If there's no specific format for this tag, or the value is invalid, |
| 313 // then just use hex. | 314 // then just use hex. |
| 314 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); | 315 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); |
| 315 } | 316 } |
| 316 ret += "\n"; | 317 ret += "\n"; |
| 317 } | 318 } |
| 318 --indent; | 319 --indent; |
| 319 ret += string(2 * indent, ' ') + ">"; | 320 ret += string(2 * indent, ' ') + ">"; |
| 320 return ret; | 321 return ret; |
| 321 } | 322 } |
| 322 | 323 |
| 323 } // namespace net | 324 } // namespace net |
| OLD | NEW |