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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 2522703002: Allow at most one preconnect to HTTP2 proxy servers (Closed)
Patch Set: rebased Created 4 years 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_job.h ('k') | net/http/http_stream_factory_impl_job_controller.h » ('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 24ddae3a08d724f67b624697bbfc911c487128ca..375a71b9d3c5d208a7f573674fb410f542ac1141 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -476,6 +476,8 @@ void HttpStreamFactoryImpl::Job::OnHttpsProxyTunnelResponseCallback(
}
void HttpStreamFactoryImpl::Job::OnPreconnectsComplete() {
+ DCHECK(!new_spdy_session_);
+
if (new_spdy_session_.get()) {
delegate_->OnNewSpdySessionReady(this, new_spdy_session_,
spdy_session_direct_);
@@ -805,6 +807,11 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionImpl() {
DCHECK(proxy_info_.proxy_server().is_valid());
next_state_ = STATE_INIT_CONNECTION_COMPLETE;
+ if (delegate_->OnInitConnection(proxy_info_)) {
+ // Return since the connection initialization can be skipped.
+ return OK;
+ }
+
using_ssl_ = origin_url_.SchemeIs(url::kHttpsScheme) ||
origin_url_.SchemeIs(url::kWssScheme);
using_spdy_ = false;
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_job_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698