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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1393713003: Remove insecure QUIC support from Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 2 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/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 8955017cded8a4ef938881953c037601cad7bffe..a1e3592ca1d9b37611e2a9ac55cb42282c5b6272 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -772,7 +772,7 @@ int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const {
return session_->params().enable_quic &&
session_->params().origin_to_force_quic_on.Equals(server_) &&
- proxy_info_.is_direct();
+ proxy_info_.is_direct() && origin_url_.SchemeIs("https");
}
int HttpStreamFactoryImpl::Job::DoWaitForJob() {
@@ -831,31 +831,29 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
}
HostPortPair destination;
std::string origin_host;
- bool secure_quic;
SSLConfig* ssl_config;
if (proxy_info_.is_quic()) {
// A proxy's certificate is expected to be valid for the proxy hostname.
destination = proxy_info_.proxy_server().host_port_pair();
origin_host = destination.host();
- secure_quic = true;
ssl_config = &proxy_ssl_config_;
// If QUIC is disabled on the destination port, return error.
if (session_->quic_stream_factory()->IsQuicDisabled(destination.port()))
return ERR_QUIC_PROTOCOL_ERROR;
} else {
+ DCHECK(using_ssl_);
// The certificate of a QUIC alternative server is expected to be valid
// for the origin of the request (in addition to being valid for the
// server itself).
destination = server_;
origin_host = origin_url_.host();
- secure_quic = using_ssl_;
ssl_config = &server_ssl_config_;
}
- int rv = quic_request_.Request(
- destination, secure_quic, request_info_.privacy_mode,
- ssl_config->GetCertVerifyFlags(), origin_host, request_info_.method,
- net_log_, io_callback_);
+ int rv =
+ quic_request_.Request(destination, request_info_.privacy_mode,
+ ssl_config->GetCertVerifyFlags(), origin_host,
+ request_info_.method, net_log_, io_callback_);
if (rv == OK) {
using_existing_quic_session_ = true;
} else {

Powered by Google App Engine
This is Rietveld 408576698