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

Side by Side Diff: net/quic/crypto/crypto_handshake.h

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CRYPTO_CRYPTO_HANDSHAKE_H_ 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // The source-address token has a timestamp in the future. 73 // The source-address token has a timestamp in the future.
74 SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 18, 74 SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 18,
75 // The source-address token has expired. 75 // The source-address token has expired.
76 SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 19, 76 SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 19,
77 77
78 MAX_FAILURE_REASON, 78 MAX_FAILURE_REASON,
79 }; 79 };
80 80
81 // These errors will be packed into an uint32 and we don't want to set the most 81 // These errors will be packed into an uint32 and we don't want to set the most
82 // significant bit, which may be misinterpreted as the sign bit. 82 // significant bit, which may be misinterpreted as the sign bit.
83 COMPILE_ASSERT(MAX_FAILURE_REASON <= 32, failure_reason_out_of_sync); 83 static_assert(MAX_FAILURE_REASON <= 32, "failure reason out of sync");
84 84
85 // A CrypterPair contains the encrypter and decrypter for an encryption level. 85 // A CrypterPair contains the encrypter and decrypter for an encryption level.
86 struct NET_EXPORT_PRIVATE CrypterPair { 86 struct NET_EXPORT_PRIVATE CrypterPair {
87 CrypterPair(); 87 CrypterPair();
88 ~CrypterPair(); 88 ~CrypterPair();
89 scoped_ptr<QuicEncrypter> encrypter; 89 scoped_ptr<QuicEncrypter> encrypter;
90 scoped_ptr<QuicDecrypter> decrypter; 90 scoped_ptr<QuicDecrypter> decrypter;
91 }; 91 };
92 92
93 // Parameters negotiated by the crypto handshake. 93 // Parameters negotiated by the crypto handshake.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 const CommonCertSets* common_cert_sets; 162 const CommonCertSets* common_cert_sets;
163 163
164 private: 164 private:
165 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig); 165 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig);
166 }; 166 };
167 167
168 } // namespace net 168 } // namespace net
169 169
170 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ 170 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc ('k') | net/quic/crypto/crypto_handshake_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698