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

Unified Diff: net/quic/quic_protocol.cc

Issue 47283002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index c586d2926e56549f45b5d9997f1a1b1347c15118..23c3b4fedebb4db28c82154dd48e5394da4d6268 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -113,10 +113,12 @@ uint32 MakeQuicTag(char a, char b, char c, char d) {
static_cast<uint32>(d) << 24;
}
-QuicVersion QuicVersionMax() { return kSupportedQuicVersions[0]; }
-
-QuicVersion QuicVersionMin() {
- return kSupportedQuicVersions[arraysize(kSupportedQuicVersions) - 1];
+QuicVersionVector QuicSupportedVersions() {
+ QuicVersionVector supported_versions;
+ for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) {
+ supported_versions.push_back(kSupportedQuicVersions[i]);
+ }
+ return supported_versions;
}
QuicTag QuicVersionToQuicTag(const QuicVersion version) {
@@ -158,13 +160,13 @@ string QuicVersionToString(const QuicVersion version) {
}
}
-string QuicVersionArrayToString(const QuicVersion versions[],
- int num_versions) {
+string QuicVersionVectorToString(const QuicVersionVector& versions) {
string result = "";
- for (int i = 0; i < num_versions; ++i) {
- const QuicVersion& version = versions[i];
- result.append(QuicVersionToString(version));
- result.append(",");
+ for (size_t i = 0; i < versions.size(); ++i) {
+ if (i != 0) {
+ result.append(",");
+ }
+ result.append(QuicVersionToString(versions[i]));
}
return result;
}
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698