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

Unified Diff: net/quic/quic_protocol.h

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 years, 8 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_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index d37320364d73b100e69196a3bcc2bae8bd9913ac..d4f23ded364300a31c439470a5c443e3263c9c27 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -222,6 +222,8 @@ enum QuicErrorCode {
QUIC_CRYPTO_NO_SUPPORT,
// The server rejected our client hello messages too many times.
QUIC_CRYPTO_TOO_MANY_REJECTS,
+ // The client rejected the server's certificate chain or signature.
+ QUIC_PROOF_INVALID,
// No error. Used as bound while iterating.
QUIC_LAST_ERROR,
@@ -233,10 +235,17 @@ enum QuicErrorCode {
// following 4 bytes: 'C' 'H' 'L' 'O'. Since it is
// stored in memory as a little endian uint32, we need
// to reverse the order of the bytes.
-#define MAKE_TAG(a, b, c, d) ((d << 24) + (c << 16) + (b << 8) + a)
-
+//
+// The TAG macro is used in header files to ensure that we don't create static
+// initialisers. In normal code, the MakeQuicTag function should be used.
+#define TAG(a, b, c, d) ((d << 24) + (c << 16) + (b << 8) + a)
const QuicVersionTag kUnsupportedVersion = -1;
-const QuicVersionTag kQuicVersion1 = MAKE_TAG('Q', '1', '.', '0');
+const QuicVersionTag kQuicVersion1 = TAG('Q', '1', '.', '0');
+#undef TAG
+
+// MakeQuicTag returns a value given the four bytes. For example:
+// MakeQuicTag('C', 'H', 'L', 'O');
+uint32 NET_EXPORT_PRIVATE MakeQuicTag(char a, char b, char c, char d);
struct NET_EXPORT_PRIVATE QuicPacketPublicHeader {
QuicPacketPublicHeader();
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698