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

Side by Side Diff: net/quic/core/quic_protocol.h

Issue 2220333003: Add VersionOfIndex() to quic_protocol.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129220409
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 | « no previous file | net/quic/core/quic_protocol.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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 typedef std::vector<QuicVersion> QuicVersionVector; 387 typedef std::vector<QuicVersion> QuicVersionVector;
388 388
389 // Returns a vector of QUIC versions in kSupportedQuicVersions. 389 // Returns a vector of QUIC versions in kSupportedQuicVersions.
390 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); 390 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions();
391 391
392 // Returns a vector of QUIC versions from |versions| which exclude any versions 392 // Returns a vector of QUIC versions from |versions| which exclude any versions
393 // which are disabled by flags. 393 // which are disabled by flags.
394 NET_EXPORT_PRIVATE QuicVersionVector 394 NET_EXPORT_PRIVATE QuicVersionVector
395 FilterSupportedVersions(QuicVersionVector versions); 395 FilterSupportedVersions(QuicVersionVector versions);
396 396
397 // Returns QUIC version of |index| in result of |versions|. Returns
398 // QUIC_VERSION_UNSUPPORTED if |index| is out of bounds.
399 NET_EXPORT_PRIVATE QuicVersionVector
400 VersionOfIndex(const QuicVersionVector& versions, int index);
401
397 // QuicTag is written to and read from the wire, but we prefer to use 402 // QuicTag is written to and read from the wire, but we prefer to use
398 // the more readable QuicVersion at other levels. 403 // the more readable QuicVersion at other levels.
399 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 404 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0
400 // if QuicVersion is unsupported. 405 // if QuicVersion is unsupported.
401 NET_EXPORT_PRIVATE QuicTag QuicVersionToQuicTag(const QuicVersion version); 406 NET_EXPORT_PRIVATE QuicTag QuicVersionToQuicTag(const QuicVersion version);
402 407
403 // Returns appropriate QuicVersion from a QuicTag. 408 // Returns appropriate QuicVersion from a QuicTag.
404 // Returns QUIC_VERSION_UNSUPPORTED if version_tag cannot be understood. 409 // Returns QUIC_VERSION_UNSUPPORTED if version_tag cannot be understood.
405 NET_EXPORT_PRIVATE QuicVersion QuicTagToQuicVersion(const QuicTag version_tag); 410 NET_EXPORT_PRIVATE QuicVersion QuicTagToQuicVersion(const QuicTag version_tag);
406 411
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1540 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1536 1541
1537 const struct iovec* iov; 1542 const struct iovec* iov;
1538 const int iov_count; 1543 const int iov_count;
1539 const size_t total_length; 1544 const size_t total_length;
1540 }; 1545 };
1541 1546
1542 } // namespace net 1547 } // namespace net
1543 1548
1544 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1549 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698