Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: net/quic/crypto/crypto_handshake_message.cc

Issue 312193005: Pass chrome version and channel in CHLO message to server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 done = true; 295 done = true;
296 } 296 }
297 } 297 }
298 break; 298 break;
299 case kPAD: 299 case kPAD:
300 ret += StringPrintf("(%d bytes of padding)", 300 ret += StringPrintf("(%d bytes of padding)",
301 static_cast<int>(it->second.size())); 301 static_cast<int>(it->second.size()));
302 done = true; 302 done = true;
303 break; 303 break;
304 case kCVER:
305 ret += it->second;
306 done = true;
307 break;
304 } 308 }
305 309
306 if (!done) { 310 if (!done) {
307 // If there's no specific format for this tag, or the value is invalid, 311 // If there's no specific format for this tag, or the value is invalid,
308 // then just use hex. 312 // then just use hex.
309 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); 313 ret += "0x" + base::HexEncode(it->second.data(), it->second.size());
310 } 314 }
311 ret += "\n"; 315 ret += "\n";
312 } 316 }
313 --indent; 317 --indent;
314 ret += string(2 * indent, ' ') + ">"; 318 ret += string(2 * indent, ' ') + ">";
315 return ret; 319 return ret;
316 } 320 }
317 321
318 } // namespace net 322 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698