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

Unified Diff: net/http/http_stream_factory_impl_job_controller.h

Issue 2260623002: Race TCP connection to proxies with QUIC connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_controller.h
diff --git a/net/http/http_stream_factory_impl_job_controller.h b/net/http/http_stream_factory_impl_job_controller.h
index c19b679166f9ae3302fe22a52e85ee0168d1409a..3efd2ac5c7d9f7713ed4acfd6a44bb5b25018421 100644
--- a/net/http/http_stream_factory_impl_job_controller.h
+++ b/net/http/http_stream_factory_impl_job_controller.h
@@ -5,6 +5,7 @@
#ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
#define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
+#include "net/base/host_port_pair.h"
#include "net/http/http_stream_factory_impl_job.h"
#include "net/http/http_stream_factory_impl_request.h"
@@ -114,6 +115,14 @@ class HttpStreamFactoryImpl::JobController
const ProxyInfo& used_proxy_info,
HttpAuthController* auth_controller) override;
+ void OnResolveProxyComplete(
+ Job* job,
+ const HttpRequestInfo& request_info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::StreamType stream_type) override;
+
// Invoked to notify the Request and Factory of the readiness of new
// SPDY session.
void OnNewSpdySessionReady(Job* job,
@@ -215,6 +224,16 @@ class HttpStreamFactoryImpl::JobController
// Remove session from the SpdySessionRequestMap.
void RemoveRequestFromSpdySessionRequestMap();
+ // Returns true if the |request_| can be fetched via an alternative
+ // proxy server, and sets |alternative_proxy_server| to the available
+ // alternative proxy server. |alternative_proxy_server| should not be null,
+ // and is owned by the caller.
+ bool ShouldCreateAlternativeProxyServerJob(
+ Job* job,
+ const ProxyInfo& proxy_info_,
+ const GURL& url,
+ ProxyServer* alternative_proxy_server) const;
+
HttpStreamFactoryImpl* factory_;
HttpNetworkSession* session_;
JobFactory* job_factory_;
@@ -249,6 +268,10 @@ class HttpStreamFactoryImpl::JobController
// It will be nulled when the |request_| is finished.
Job* bound_job_;
+ // True if an alternative proxy server job was started in the past to fetch
+ // |request_|.
+ bool started_alternative_proxy_server_job_;
+
base::WeakPtrFactory<JobController> ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698