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

Unified Diff: trunk/src/net/quic/quic_client_session.cc

Issue 485943004: Revert 290320 "Refactor pooling logic into a helper method" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | « trunk/src/net/quic/quic_client_session.h ('k') | trunk/src/net/quic/quic_client_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/quic/quic_client_session.cc
===================================================================
--- trunk/src/net/quic/quic_client_session.cc (revision 290385)
+++ trunk/src/net/quic/quic_client_session.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/values.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/http/transport_security_state.h"
#include "net/quic/crypto/proof_verifier_chromium.h"
#include "net/quic/crypto/quic_server_info.h"
#include "net/quic/quic_connection_helper.h"
@@ -21,7 +20,6 @@
#include "net/quic/quic_default_packet_writer.h"
#include "net/quic/quic_server_id.h"
#include "net/quic/quic_stream_factory.h"
-#include "net/spdy/spdy_session.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/ssl_connection_status_flags.h"
#include "net/ssl/ssl_info.h"
@@ -140,7 +138,6 @@
scoped_ptr<QuicDefaultPacketWriter> writer,
QuicStreamFactory* stream_factory,
QuicCryptoClientStreamFactory* crypto_client_stream_factory,
- TransportSecurityState* transport_security_state,
scoped_ptr<QuicServerInfo> server_info,
const QuicServerId& server_id,
const QuicConfig& config,
@@ -154,7 +151,6 @@
socket_(socket.Pass()),
writer_(writer.Pass()),
read_buffer_(new IOBufferWithSize(kMaxPacketSize)),
- transport_security_state_(transport_security_state),
server_info_(server_info.Pass()),
read_pending_(false),
num_total_streams_(0),
@@ -493,8 +489,28 @@
return true;
}
- return SpdySession::CanPool(transport_security_state_, ssl_info,
- server_host_port_.host(), hostname);
+ // Disable pooling for secure sessions.
+ // TODO(rch): re-enable this.
+ return false;
+#if 0
+ bool unused = false;
+ // Pooling is prohibited if the server cert is not valid for the new domain,
+ // and for connections on which client certs were sent. It is also prohibited
+ // when channel ID was sent if the hosts are from different eTLDs+1.
+ if (!ssl_info.cert->VerifyNameMatch(hostname, &unused))
+ return false;
+
+ if (ssl_info.client_cert_sent)
+ return false;
+
+ if (ssl_info.channel_id_sent &&
+ ChannelIDService::GetDomainForHost(hostname) !=
+ ChannelIDService::GetDomainForHost(server_host_port_.host())) {
+ return false;
+ }
+
+ return true;
+#endif
}
QuicDataStream* QuicClientSession::CreateIncomingDataStream(
« no previous file with comments | « trunk/src/net/quic/quic_client_session.h ('k') | trunk/src/net/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698