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

Unified Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 431483002: QUIC - Added separate error condition for invalid expiry seconds and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_client_config.cc
diff --git a/net/quic/crypto/quic_crypto_client_config.cc b/net/quic/crypto/quic_crypto_client_config.cc
index ce2705d1e610091958b5fc7753fe63ed766da60a..b9296614558fd1a664b88de8b2a2ef841cb21e88 100644
--- a/net/quic/crypto/quic_crypto_client_config.cc
+++ b/net/quic/crypto/quic_crypto_client_config.cc
@@ -40,6 +40,7 @@ enum ServerConfigState {
SERVER_CONFIG_INVALID = 1,
SERVER_CONFIG_CORRUPTED = 2,
SERVER_CONFIG_EXPIRED = 3,
+ SERVER_CONFIG_INVALID_EXPIRY_SECONDS = 4,
// NOTE: Add new server config states only immediately above this line. Make
// sure to update the QuicServerConfigState enum in
@@ -87,8 +88,11 @@ bool QuicCryptoClientConfig::CachedState::IsComplete(QuicWallTime now) const {
}
uint64 expiry_seconds;
- if (scfg->GetUint64(kEXPY, &expiry_seconds) != QUIC_NO_ERROR ||
- now.ToUNIXSeconds() >= expiry_seconds) {
+ if (scfg->GetUint64(kEXPY, &expiry_seconds) != QUIC_NO_ERROR) {
+ RecordServerConfigState(SERVER_CONFIG_INVALID_EXPIRY_SECONDS);
+ return false;
jar (doing other things) 2014/07/31 23:23:10 Q: Do we also have histogram showing "how expired
ramant (doing other things) 2014/08/02 00:01:33 Done.
+ }
+ if (now.ToUNIXSeconds() >= expiry_seconds) {
RecordServerConfigState(SERVER_CONFIG_EXPIRED);
return false;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698