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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/quic_network_transaction_unittest.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index f957c18f6244c96ad192d3b4bcb154c6f7a837e8..3e0f4e3a50775605ad5bd8dc06630aef0a7c36dc 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -63,9 +63,6 @@ const int32 kInitialReceiveWindowSize = 10 * 1024 * 1024; // 10MB
// Set the maximum number of undecryptable packets the connection will store.
const int32 kMaxUndecryptablePackets = 100;
-const char kDummyHostname[] = "quic.global.props";
-const uint16 kDummyPort = 0;
-
void HistogramCreateSessionFailure(enum CreateSessionFailure error) {
UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.CreationError", error,
CREATION_ERROR_MAX);
@@ -619,11 +616,8 @@ QuicStreamFactory::~QuicStreamFactory() {
void QuicStreamFactory::set_require_confirmation(bool require_confirmation) {
require_confirmation_ = require_confirmation;
if (http_server_properties_ && (!(local_address_ == IPEndPoint()))) {
- // TODO(rtenneti): Delete host_port_pair and persist data in globals.
- HostPortPair host_port_pair(kDummyHostname, kDummyPort);
- http_server_properties_->SetSupportsQuic(
- host_port_pair, !require_confirmation,
- local_address_.ToStringWithoutPort());
+ http_server_properties_->SetSupportsQuic(!require_confirmation,
+ local_address_.address());
}
}
@@ -1002,11 +996,9 @@ int QuicStreamFactory::CreateSession(
socket->GetLocalAddress(&local_address_);
if (check_persisted_supports_quic_ && http_server_properties_) {
check_persisted_supports_quic_ = false;
- // TODO(rtenneti): Delete host_port_pair and persist data in globals.
- HostPortPair host_port_pair(kDummyHostname, kDummyPort);
- SupportsQuic supports_quic(true, local_address_.ToStringWithoutPort());
- if (http_server_properties_->GetSupportsQuic(
- host_port_pair).Equals(supports_quic)) {
+ IPAddressNumber last_address;
+ if (http_server_properties_->GetSupportsQuic(&last_address) &&
+ last_address == local_address_.address()) {
require_confirmation_ = false;
}
}
@@ -1249,7 +1241,9 @@ void QuicStreamFactory::ProcessGoingAwaySession(
const HostPortPair& server = server_id.host_port_pair();
// Don't try to change the alternate-protocol state, if the
// alternate-protocol state is unknown.
- if (!http_server_properties_->HasAlternateProtocol(server))
+ const AlternateProtocolInfo alternate =
+ http_server_properties_->GetAlternateProtocol(server);
+ if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
return;
// TODO(rch): In the special case where the session has received no
@@ -1258,8 +1252,6 @@ void QuicStreamFactory::ProcessGoingAwaySession(
// session connected until the handshake has been confirmed.
HistogramBrokenAlternateProtocolLocation(
BROKEN_ALTERNATE_PROTOCOL_LOCATION_QUIC_STREAM_FACTORY);
- AlternateProtocolInfo alternate =
- http_server_properties_->GetAlternateProtocol(server);
DCHECK_EQ(QUIC, alternate.protocol);
// Since the session was active, there's no longer an
« no previous file with comments | « net/quic/quic_network_transaction_unittest.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698