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

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

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 | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_server_config.h
diff --git a/net/quic/crypto/quic_crypto_server_config.h b/net/quic/crypto/quic_crypto_server_config.h
index 4da3ce42718b05e095c4c1722cfaa79894c77078..0b76268e3b5ed3d6a887d7609cb239c620457ab2 100644
--- a/net/quic/crypto/quic_crypto_server_config.h
+++ b/net/quic/crypto/quic_crypto_server_config.h
@@ -39,6 +39,14 @@ namespace test {
class QuicCryptoServerConfigPeer;
} // namespace test
+// Hook that allows application code to subscribe to primary config changes.
+class PrimaryConfigChangedCallback {
+ public:
+ PrimaryConfigChangedCallback();
+ virtual ~PrimaryConfigChangedCallback();
+ virtual void Run(const std::string& scid) = 0;
+};
+
// Callback used to accept the result of the |client_hello| validation step.
class NET_EXPORT_PRIVATE ValidateClientHelloResultCallback {
public:
@@ -257,6 +265,9 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// uniqueness.
void set_server_nonce_strike_register_window_secs(uint32 window_secs);
+ // Set and take ownership of the callback to invoke on primary config changes.
+ void AcquirePrimaryConfigChangedCb(PrimaryConfigChangedCallback* cb);
+
private:
friend class test::QuicCryptoServerConfigPeer;
@@ -385,6 +396,8 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// next_config_promotion_time_ contains the nearest, future time when an
// active config will be promoted to primary.
mutable QuicWallTime next_config_promotion_time_;
+ // Callback to invoke when the primary config changes.
+ scoped_ptr<PrimaryConfigChangedCallback> primary_config_changed_cb_;
// Protects access to the pointer held by strike_register_client_.
mutable base::Lock strike_register_client_lock_;
« no previous file with comments | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698