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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 981633002: Created new URLRequestContext for secure proxy check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 9 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/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9f6e39883934a6fea57ac53b78702783f21fc26..4f93230d6a23f12473d45a8ee7bf247a2933b460 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -718,8 +718,9 @@ bool HttpStreamFactoryImpl::Job::ShouldForceSpdyWithoutSSL() const {
bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const {
return session_->params().enable_quic &&
- session_->params().origin_to_force_quic_on.Equals(origin_) &&
- proxy_info_.is_direct();
+ session_->params().origin_to_force_quic_on.Equals(origin_) &&
+ proxy_info_.is_direct() &&
+ (request_info_.load_flags & LOAD_UNENCRYPTED_HTTP11) == 0;
Ryan Hamilton 2015/03/06 23:19:52 This method is also only called from a command lin
}
int HttpStreamFactoryImpl::Job::DoWaitForJob() {
@@ -747,12 +748,17 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
using_ssl_ = request_info_.url.SchemeIs("https") ||
request_info_.url.SchemeIs("wss") || ShouldForceSpdySSL();
+ DCHECK(!using_ssl_ ||
+ (request_info_.load_flags & LOAD_UNENCRYPTED_HTTP11) == 0);
+
using_spdy_ = false;
if (ShouldForceQuic())
using_quic_ = true;
DCHECK(!using_quic_ || session_->params().enable_quic);
+ DCHECK(!using_quic_ ||
+ (request_info_.load_flags & LOAD_UNENCRYPTED_HTTP11) == 0);
if (proxy_info_.is_quic()) {
using_quic_ = true;
@@ -805,6 +811,8 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
// Update the spdy session key for the request that launched this job.
request_->SetSpdySessionKey(spdy_session_key);
}
+ DCHECK(!using_spdy_ ||
+ (request_info_.load_flags & LOAD_UNENCRYPTED_HTTP11) == 0);
// OK, there's no available SPDY session. Let |waiting_job_| resume if it's
// paused.
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698