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

Unified Diff: net/quic/quic_protocol.cc

Issue 22647002: Add support to QUIC for QUIC_VERSION_8: for RSA-PSS signatures, set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_protocol.cc
===================================================================
--- net/quic/quic_protocol.cc (revision 216255)
+++ net/quic/quic_protocol.cc (working copy)
@@ -129,6 +129,8 @@
return MakeQuicTag('Q', '0', '0', '6');
case QUIC_VERSION_7:
return MakeQuicTag('Q', '0', '0', '7');
+ case QUIC_VERSION_8:
+ return MakeQuicTag('Q', '0', '0', '8');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -140,11 +142,14 @@
QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) {
const QuicTag quic_tag_v6 = MakeQuicTag('Q', '0', '0', '6');
const QuicTag quic_tag_v7 = MakeQuicTag('Q', '0', '0', '7');
+ const QuicTag quic_tag_v8 = MakeQuicTag('Q', '0', '0', '8');
if (version_tag == quic_tag_v6) {
return QUIC_VERSION_6;
} else if (version_tag == quic_tag_v7) {
return QUIC_VERSION_7;
+ } else if (version_tag == quic_tag_v8) {
+ return QUIC_VERSION_8;
} else {
// Reading from the client so this should not be considered an ERROR.
DLOG(INFO) << "Unsupported QuicTag version: "
@@ -153,14 +158,15 @@
}
}
+#define RETURN_STRING_LITERAL(x) \
+case x: \
+return #x
+
string QuicVersionToString(const QuicVersion version) {
- // TODO(rjshade): Possibly start using RETURN_STRING_LITERAL here when we
- // start supporting a lot of versions.
switch (version) {
- case QUIC_VERSION_6:
- return "QUIC_VERSION_6";
- case QUIC_VERSION_7:
- return "QUIC_VERSION_7";
+ RETURN_STRING_LITERAL(QUIC_VERSION_6);
+ RETURN_STRING_LITERAL(QUIC_VERSION_7);
+ RETURN_STRING_LITERAL(QUIC_VERSION_8);
default:
return "QUIC_VERSION_UNSUPPORTED";
}

Powered by Google App Engine
This is Rietveld 408576698