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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 23279011: Require handshake confirmation until a QUIC connection is created succesfully when using a new netw… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 7 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
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 892e5319439a7c6a4345c895fdfe091f2e7b2282..0a16f01ff8c9c0654e8ec46feb4009bdb1366c24 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -227,6 +227,7 @@ int QuicStreamFactory::Job::DoConnect() {
cert_verifier_, address_list_, net_log_);
session_->StartReading();
int rv = session_->CryptoConnect(
+ factory_->require_confirmation(),
base::Bind(&QuicStreamFactory::Job::OnIOComplete,
base::Unretained(this)));
return rv;
@@ -249,7 +250,8 @@ QuicStreamFactory::QuicStreamFactory(
QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
QuicRandom* random_generator,
QuicClock* clock)
- : host_resolver_(host_resolver),
+ : require_confirmation_(true),
wtc 2013/08/21 01:09:32 Can you explain why require_confirmation_ should b
+ host_resolver_(host_resolver),
client_socket_factory_(client_socket_factory),
http_server_properties_(http_server_properties),
quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory),
@@ -304,6 +306,7 @@ int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair,
void QuicStreamFactory::OnJobComplete(Job* job, int rv) {
if (rv == OK) {
+ require_confirmation_ = false;
// Create all the streams, but do not notify them yet.
for (RequestSet::iterator it = job_requests_map_[job].begin();
it != job_requests_map_[job].end() ; ++it) {
@@ -403,6 +406,7 @@ base::Value* QuicStreamFactory::QuicStreamFactoryInfoToValue() const {
void QuicStreamFactory::OnIPAddressChanged() {
CloseAllSessions(ERR_NETWORK_CHANGED);
+ require_confirmation_ = true;
}
bool QuicStreamFactory::HasActiveSession(

Powered by Google App Engine
This is Rietveld 408576698