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

Unified Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2277633006: Removes unused code in QuicStreamFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed OnConnectTimeout. Created 4 years, 4 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/chromium/quic_chromium_client_session.h ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_chromium_client_session.cc
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc
index 15aee3e7d61d9f49ac27a4804a68b1e1a4cd3bb5..9f5cc6f87b59bb00406ad687aa34119cbf8f6692 100644
--- a/net/quic/chromium/quic_chromium_client_session.cc
+++ b/net/quic/chromium/quic_chromium_client_session.cc
@@ -39,10 +39,6 @@ namespace net {
namespace {
-// The length of time to wait for a 0-RTT handshake to complete
-// before allowing the requests to possibly proceed over TCP.
-const int k0RttHandshakeTimeoutMs = 300;
-
// IPv6 packets have an additional 20 bytes of overhead than IPv4 packets.
const size_t kAdditionalOverheadForIPv6 = 20;
@@ -614,15 +610,8 @@ int QuicChromiumClientSession::CryptoConnect(
// Unless we require handshake confirmation, activate the session if
// we have established initial encryption.
- if (!require_confirmation_ && IsEncryptionEstablished()) {
- // To mitigate the effects of hanging 0-RTT connections, set up a timer to
- // cancel any requests, if the handshake takes too long.
- task_runner_->PostDelayedTask(
- FROM_HERE, base::Bind(&QuicChromiumClientSession::OnConnectTimeout,
- weak_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(k0RttHandshakeTimeoutMs));
+ if (!require_confirmation_ && IsEncryptionEstablished())
return OK;
- }
callback_ = callback;
return ERR_IO_PENDING;
@@ -1169,19 +1158,6 @@ void QuicChromiumClientSession::NotifyFactoryOfSessionClosed() {
stream_factory_->OnSessionClosed(this);
}
-void QuicChromiumClientSession::OnConnectTimeout() {
- DCHECK(callback_.is_null());
-
- if (IsCryptoHandshakeConfirmed())
- return;
-
- // TODO(rch): re-enable this code once beta is cut.
- // if (stream_factory_)
- // stream_factory_->OnSessionConnectTimeout(this);
- // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
- // DCHECK_EQ(0u, GetNumOpenOutgoingStreams());
-}
-
bool QuicChromiumClientSession::MigrateToSocket(
std::unique_ptr<DatagramClientSocket> socket,
std::unique_ptr<QuicChromiumPacketReader> reader,
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session.h ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698