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

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

Issue 137423015: Export primary insecure and secure QUIC config id via internal server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_server_config.cc
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index 85de457d37eafa8a9dc31aa70b1f37fc510c1874..e2b0583e052d2d586cfe23dea23b8839ed628605 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -147,6 +147,11 @@ class VerifyNonceIsValidAndUniqueCallback
// static
const char QuicCryptoServerConfig::TESTING[] = "secret string for testing";
+PrimaryConfigChangedCallback::PrimaryConfigChangedCallback() {
+}
+
+PrimaryConfigChangedCallback::~PrimaryConfigChangedCallback() {
+}
ValidateClientHelloResultCallback::ValidateClientHelloResultCallback() {
}
@@ -792,6 +797,9 @@ void QuicCryptoServerConfig::SelectNewPrimaryConfig(
<< base::HexEncode(
reinterpret_cast<const char*>(primary_config_->orbit),
kOrbitSize);
+ if (primary_config_changed_cb_.get() != NULL) {
+ primary_config_changed_cb_->Run(primary_config_->id);
+ }
return;
}
@@ -809,6 +817,9 @@ void QuicCryptoServerConfig::SelectNewPrimaryConfig(
reinterpret_cast<const char*>(primary_config_->orbit),
kOrbitSize);
next_config_promotion_time_ = QuicWallTime::Zero();
+ if (primary_config_changed_cb_.get() != NULL) {
+ primary_config_changed_cb_->Run(primary_config_->id);
+ }
}
void QuicCryptoServerConfig::EvaluateClientHello(
@@ -1192,6 +1203,12 @@ void QuicCryptoServerConfig::set_server_nonce_strike_register_window_secs(
server_nonce_strike_register_window_secs_ = window_secs;
}
+void QuicCryptoServerConfig::AcquirePrimaryConfigChangedCb(
+ PrimaryConfigChangedCallback* cb) {
+ base::AutoLock locked(configs_lock_);
+ primary_config_changed_cb_.reset(cb);
+}
+
string QuicCryptoServerConfig::NewSourceAddressToken(
const IPEndPoint& ip,
QuicRandom* rand,
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698