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

Unified Diff: net/http/http_stream_factory_impl_job_controller.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
Index: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 4e3aa673f3e74cfd75524af4417350c9712096e2..ae7e93ab72d8984f681c9ca442076756adc7e9fc 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -174,6 +174,11 @@ void HttpStreamFactoryImpl::JobController::OnStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info) {
DCHECK(job);
+ // TODO(tbansal): Remove |used_proxy_info| from the method arguments.
+ DCHECK(job->proxy_info().is_empty() == used_proxy_info.is_empty() ||
+ job->proxy_info().proxy_server() == used_proxy_info.proxy_server());
+
+ factory_->OnStreamReady(job->proxy_info());
if (job_bound_ && bound_job_ != job) {
// We have bound a job to the associated Request, |job| has been orphaned.
@@ -367,6 +372,11 @@ void HttpStreamFactoryImpl::JobController::OnNeedsProxyAuth(
auth_controller);
}
+bool HttpStreamFactoryImpl::JobController::OnInitConnection(
+ const ProxyInfo& proxy_info) {
+ return factory_->OnInitConnection(*this, proxy_info);
+}
+
void HttpStreamFactoryImpl::JobController::OnResolveProxyComplete(
Job* job,
const HttpRequestInfo& request_info,
@@ -413,6 +423,7 @@ void HttpStreamFactoryImpl::JobController::OnNewSpdySessionReady(
bool direct) {
DCHECK(job);
DCHECK(job->using_spdy());
+ DCHECK(!is_preconnect_);
bool is_job_orphaned = job_bound_ && bound_job_ != job;
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.h ('k') | net/http/http_stream_factory_impl_job_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698