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

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

Issue 2241183004: Landing Recent QUIC changes until Sat Aug 13 04:32:36 2016 UTC-0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler error. 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE); 244 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE);
245 RETURN_STRING_LITERAL(QUIC_CRYPTO_INTERNAL_ERROR); 245 RETURN_STRING_LITERAL(QUIC_CRYPTO_INTERNAL_ERROR);
246 RETURN_STRING_LITERAL(QUIC_CRYPTO_VERSION_NOT_SUPPORTED); 246 RETURN_STRING_LITERAL(QUIC_CRYPTO_VERSION_NOT_SUPPORTED);
247 RETURN_STRING_LITERAL(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT); 247 RETURN_STRING_LITERAL(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT);
248 RETURN_STRING_LITERAL(QUIC_CRYPTO_NO_SUPPORT); 248 RETURN_STRING_LITERAL(QUIC_CRYPTO_NO_SUPPORT);
249 RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); 249 RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_TYPE);
250 RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER); 250 RETURN_STRING_LITERAL(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER);
251 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND); 251 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND);
252 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP); 252 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP);
253 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND); 253 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND);
254 RETURN_STRING_LITERAL(QUIC_UNSUPPORTED_PROOF_DEMAND);
254 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_ID); 255 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_ID);
255 RETURN_STRING_LITERAL(QUIC_INVALID_PRIORITY); 256 RETURN_STRING_LITERAL(QUIC_INVALID_PRIORITY);
256 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OPEN_STREAMS); 257 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OPEN_STREAMS);
257 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESET); 258 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESET);
258 RETURN_STRING_LITERAL(QUIC_INVALID_VERSION); 259 RETURN_STRING_LITERAL(QUIC_INVALID_VERSION);
259 RETURN_STRING_LITERAL(QUIC_INVALID_HEADER_ID); 260 RETURN_STRING_LITERAL(QUIC_INVALID_HEADER_ID);
260 RETURN_STRING_LITERAL(QUIC_INVALID_NEGOTIATED_VALUE); 261 RETURN_STRING_LITERAL(QUIC_INVALID_NEGOTIATED_VALUE);
261 RETURN_STRING_LITERAL(QUIC_DECOMPRESSION_FAILURE); 262 RETURN_STRING_LITERAL(QUIC_DECOMPRESSION_FAILURE);
262 RETURN_STRING_LITERAL(QUIC_NETWORK_IDLE_TIMEOUT); 263 RETURN_STRING_LITERAL(QUIC_NETWORK_IDLE_TIMEOUT);
263 RETURN_STRING_LITERAL(QUIC_HANDSHAKE_TIMEOUT); 264 RETURN_STRING_LITERAL(QUIC_HANDSHAKE_TIMEOUT);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 uint32_t option = 0; 375 uint32_t option = 0;
375 for (char token_char : base::Reversed(token)) { 376 for (char token_char : base::Reversed(token)) {
376 option <<= 8; 377 option <<= 8;
377 option |= static_cast<unsigned char>(token_char); 378 option |= static_cast<unsigned char>(token_char);
378 } 379 }
379 options.push_back(option); 380 options.push_back(option);
380 } 381 }
381 return options; 382 return options;
382 } 383 }
383 384
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) { 385 string QuicUtils::PeerAddressChangeTypeToString(PeerAddressChangeType type) {
393 switch (type) { 386 switch (type) {
394 RETURN_STRING_LITERAL(NO_CHANGE); 387 RETURN_STRING_LITERAL(NO_CHANGE);
395 RETURN_STRING_LITERAL(PORT_CHANGE); 388 RETURN_STRING_LITERAL(PORT_CHANGE);
396 RETURN_STRING_LITERAL(IPV4_SUBNET_CHANGE); 389 RETURN_STRING_LITERAL(IPV4_SUBNET_CHANGE);
397 RETURN_STRING_LITERAL(IPV4_TO_IPV6_CHANGE); 390 RETURN_STRING_LITERAL(IPV4_TO_IPV6_CHANGE);
398 RETURN_STRING_LITERAL(IPV6_TO_IPV4_CHANGE); 391 RETURN_STRING_LITERAL(IPV6_TO_IPV4_CHANGE);
399 RETURN_STRING_LITERAL(IPV6_TO_IPV6_CHANGE); 392 RETURN_STRING_LITERAL(IPV6_TO_IPV6_CHANGE);
400 RETURN_STRING_LITERAL(UNSPECIFIED_CHANGE); 393 RETURN_STRING_LITERAL(UNSPECIFIED_CHANGE);
401 } 394 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 566
574 bytes_remaining -= line_bytes; 567 bytes_remaining -= line_bytes;
575 offset += line_bytes; 568 offset += line_bytes;
576 p += line_bytes; 569 p += line_bytes;
577 s += '\n'; 570 s += '\n';
578 } 571 }
579 return s; 572 return s;
580 } 573 }
581 574
582 } // namespace net 575 } // 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