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

Side by Side Diff: net/quic/core/quic_utils.cc

Issue 2246843005: Remove QuicUtils::ListTags and use ToDebugString() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129676537
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/quic/core/quic_utils.h ('k') | net/quic/core/quic_utils_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/core/quic_utils.h" 5 #include "net/quic/core/quic_utils.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 uint32_t option = 0; 374 uint32_t option = 0;
375 for (char token_char : base::Reversed(token)) { 375 for (char token_char : base::Reversed(token)) {
376 option <<= 8; 376 option <<= 8;
377 option |= static_cast<unsigned char>(token_char); 377 option |= static_cast<unsigned char>(token_char);
378 } 378 }
379 options.push_back(option); 379 options.push_back(option);
380 } 380 }
381 return options; 381 return options;
382 } 382 }
383 383
384 string QuicUtils::ListTags(QuicTagValueMap tag_map) {
385 string result;
386 for (auto entry : tag_map) {
387 result.append(TagToString(entry.first) + " ");
388 }
389 return result;
390 }
391
392 string QuicUtils::PeerAddressChangeTypeToString(PeerAddressChangeType type) { 384 string QuicUtils::PeerAddressChangeTypeToString(PeerAddressChangeType type) {
393 switch (type) { 385 switch (type) {
394 RETURN_STRING_LITERAL(NO_CHANGE); 386 RETURN_STRING_LITERAL(NO_CHANGE);
395 RETURN_STRING_LITERAL(PORT_CHANGE); 387 RETURN_STRING_LITERAL(PORT_CHANGE);
396 RETURN_STRING_LITERAL(IPV4_SUBNET_CHANGE); 388 RETURN_STRING_LITERAL(IPV4_SUBNET_CHANGE);
397 RETURN_STRING_LITERAL(IPV4_TO_IPV6_CHANGE); 389 RETURN_STRING_LITERAL(IPV4_TO_IPV6_CHANGE);
398 RETURN_STRING_LITERAL(IPV6_TO_IPV4_CHANGE); 390 RETURN_STRING_LITERAL(IPV6_TO_IPV4_CHANGE);
399 RETURN_STRING_LITERAL(IPV6_TO_IPV6_CHANGE); 391 RETURN_STRING_LITERAL(IPV6_TO_IPV6_CHANGE);
400 RETURN_STRING_LITERAL(UNSPECIFIED_CHANGE); 392 RETURN_STRING_LITERAL(UNSPECIFIED_CHANGE);
401 } 393 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 565
574 bytes_remaining -= line_bytes; 566 bytes_remaining -= line_bytes;
575 offset += line_bytes; 567 offset += line_bytes;
576 p += line_bytes; 568 p += line_bytes;
577 s += '\n'; 569 s += '\n';
578 } 570 }
579 return s; 571 return s;
580 } 572 }
581 573
582 } // namespace net 574 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_utils.h ('k') | net/quic/core/quic_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698