summaryrefslogtreecommitdiffstats
path: root/net/quic/crypto/quic_crypto_server_config.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-30 04:03:04 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-30 04:03:04 +0000
commitc5e1aca90ddc180362e0663648c482b874436adf (patch)
tree5f2a71349aaebe5fae92f5651ae8f5bf7a0db366 /net/quic/crypto/quic_crypto_server_config.cc
parentf13d7a712f2455a7e9699c12d7ac4d4c604c819f (diff)
downloadchromium_src-c5e1aca90ddc180362e0663648c482b874436adf.zip
chromium_src-c5e1aca90ddc180362e0663648c482b874436adf.tar.gz
chromium_src-c5e1aca90ddc180362e0663648c482b874436adf.tar.bz2
Land Recent QUIC Changes.
Cleanup: remove BlockedWriterInterface from QuicPacketWriter. No behavior changes. Merge internal change: 60499316 https://codereview.chromium.org/135363006/ Properly trigger OnCanWrite processing from PacketDroppingTestWriter. Re-enable the LargePostWithPacketLossAndBlockedSocket test. Testing only. Dialing back the loss from 30% to 10% seems to have stabilized the test. Merge internal change: 60479729 https://codereview.chromium.org/131503016/ Use LOG_IF instead of LOG_IF_FIRST_N in a few places, as per avd's suggestion. Merge internal change: 60382807 https://codereview.chromium.org/149163004/ Change the default RTT from 60ms to 100ms, which is more typical of internal server's. Merge internal change: 60366147 https://codereview.chromium.org/146583006/ Remove an impossible check in QuicConnection for when a packet is retransmitted before it is sent. Updating the tests also found and fixed an edge case where a truncated ack could cause the SentPacketManager to raise the high water mark above a pending packet. Merge internal change: 60169343 https://codereview.chromium.org/145123003/ Export primary insecure and secure QUIC config id via internal server status pages. Merge internal change: 60108488 https://codereview.chromium.org/137423015/ Export SCIDs, QUIC secret seed names and orbits to varz. Merge internal change: 60107113 https://codereview.chromium.org/144033006/ Refactor QuicConnection to use explicit notification for getting onto the write blocked list. Remove the PacketWriter interface from QuicDispatcher. Merge internal change: 60103466 Fix build. Build got broken by a race between presubmit tests and me editing the file that was in the process of being submitted. :( Merge internal change: 60104577 https://codereview.chromium.org/149263002/ Remove the word Payload from AddFrame methods in QUIC framer. Merge internal change: 60101552 https://codereview.chromium.org/131513022/ Fixes QUIC's Cubic sender to use correct alpha when in Reno mode. Merge internal change: 60088487 https://codereview.chromium.org/136453013/ Add DFATALs to QuicFramer branches where packet creation fails. Merge internal change: 60077767 https://codereview.chromium.org/148073002/ Fix a QUIC bug where previously undecryptable packets were not decrypted before sending out an ack when the encryption level changed. Merge internal change: 60051502 Added logging for all frame types. Added code to dump frames and packet_headers. Changes to make QuicHttpStreamTest work. https://codereview.chromium.org/144063012/ R=rch@chromium.org Review URL: https://codereview.chromium.org/146033003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/crypto/quic_crypto_server_config.cc')
-rw-r--r--net/quic/crypto/quic_crypto_server_config.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index 8d8c203..e2b0583 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() {
}
@@ -416,6 +421,14 @@ bool QuicCryptoServerConfig::SetConfigs(
return ok;
}
+void QuicCryptoServerConfig::GetConfigIds(vector<string>* scids) const {
+ base::AutoLock locked(configs_lock_);
+ for (ConfigMap::const_iterator it = configs_.begin();
+ it != configs_.end(); ++it) {
+ scids->push_back(it->first);
+ }
+}
+
void QuicCryptoServerConfig::ValidateClientHello(
const CryptoHandshakeMessage& client_hello,
IPEndPoint client_ip,
@@ -784,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;
}
@@ -801,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(
@@ -1184,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,