| OLD | NEW |
| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // | 380 // |
| 381 // IMPORTANT: if you are adding to this list, follow the instructions at | 381 // IMPORTANT: if you are adding to this list, follow the instructions at |
| 382 // http://sites/quic/adding-and-removing-versions | 382 // http://sites/quic/adding-and-removing-versions |
| 383 static const QuicVersion kSupportedQuicVersions[] = { | 383 static const QuicVersion kSupportedQuicVersions[] = { |
| 384 QUIC_VERSION_36, QUIC_VERSION_35, QUIC_VERSION_34, QUIC_VERSION_33, | 384 QUIC_VERSION_36, QUIC_VERSION_35, QUIC_VERSION_34, QUIC_VERSION_33, |
| 385 QUIC_VERSION_32, QUIC_VERSION_31, QUIC_VERSION_30}; | 385 QUIC_VERSION_32, QUIC_VERSION_31, QUIC_VERSION_30}; |
| 386 | 386 |
| 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 AllSupportedVersions(); |
| 391 |
| 392 // Returns a vector of QUIC versions from kSupportedQuicVersions which exclude |
| 393 // any versions which are disabled by flags. |
| 394 NET_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions(); |
| 391 | 395 |
| 392 // Returns a vector of QUIC versions from |versions| which exclude any versions | 396 // Returns a vector of QUIC versions from |versions| which exclude any versions |
| 393 // which are disabled by flags. | 397 // which are disabled by flags. |
| 394 NET_EXPORT_PRIVATE QuicVersionVector | 398 NET_EXPORT_PRIVATE QuicVersionVector |
| 395 FilterSupportedVersions(QuicVersionVector versions); | 399 FilterSupportedVersions(QuicVersionVector versions); |
| 396 | 400 |
| 397 // Returns QUIC version of |index| in result of |versions|. Returns | 401 // Returns QUIC version of |index| in result of |versions|. Returns |
| 398 // QUIC_VERSION_UNSUPPORTED if |index| is out of bounds. | 402 // QUIC_VERSION_UNSUPPORTED if |index| is out of bounds. |
| 399 NET_EXPORT_PRIVATE QuicVersionVector | 403 NET_EXPORT_PRIVATE QuicVersionVector |
| 400 VersionOfIndex(const QuicVersionVector& versions, int index); | 404 VersionOfIndex(const QuicVersionVector& versions, int index); |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1554 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
| 1551 | 1555 |
| 1552 const struct iovec* iov; | 1556 const struct iovec* iov; |
| 1553 const int iov_count; | 1557 const int iov_count; |
| 1554 const size_t total_length; | 1558 const size_t total_length; |
| 1555 }; | 1559 }; |
| 1556 | 1560 |
| 1557 } // namespace net | 1561 } // namespace net |
| 1558 | 1562 |
| 1559 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1563 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |