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 93b11ef4f02cbff300a5c3cacd5822ad74748d66..d00e67677df1c62763bf662f04d2c9ed28a8dc51 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, |
wtc
2014/08/04 23:36:30
Nit: this can be shortened to "SERVER_CONFIG_INVAL
ramant (doing other things)
2014/08/05 22:07:25
Done.
|
// NOTE: Add new server config states only immediately above this line. Make |
// sure to update the QuicServerConfigState enum in |
@@ -87,8 +88,14 @@ 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; |
+ } |
+ if (now.ToUNIXSeconds() >= expiry_seconds) { |
+ UMA_HISTOGRAM_TIMES( |
+ "Net.QuicClientHelloServerConfig.HowExpired", |
+ base::TimeDelta::FromSeconds(now.ToUNIXSeconds() - expiry_seconds)); |
RecordServerConfigState(SERVER_CONFIG_EXPIRED); |
return false; |
} |