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

Unified Diff: net/http/http_stream_factory_impl.h

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 | « no previous file | net/http/http_stream_factory_impl.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.h
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index 92301356d30b261ead4cf7f2b4ff12dbff8cf9c7..99aaf2206455e00c6fdfd20100c1e927238f0d73 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -25,6 +25,7 @@
namespace net {
class HttpNetworkSession;
+class ProxyInfo;
class SpdySession;
class NetLogWithSource;
@@ -129,6 +130,19 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
// from |job_controller_set_|.
void OnJobControllerComplete(JobController* controller);
+ // Returns true if a connection to the proxy server contained in |proxy_info|
+ // can be skipped by a job controlled by |controller|.
+ bool OnInitConnection(const JobController& controller,
+ const ProxyInfo& proxy_info);
+
+ // Notifies |this| that a stream to the proxy server contained in |proxy_info|
+ // is ready.
+ void OnStreamReady(const ProxyInfo& proxy_info);
+
+ // Returns true if |proxy_info| contains a proxy server that supports request
+ // priorities.
+ bool ProxyServerSupportsPriorities(const ProxyInfo& proxy_info) const;
+
HttpNetworkSession* const session_;
// All Requests are handed out to clients. By the time HttpStreamFactoryImpl
@@ -146,9 +160,18 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
// Factory used by job controllers for creating jobs.
std::unique_ptr<JobFactory> job_factory_;
+ // Set of proxy servers that support request priorities to which subsequent
+ // preconnects should be skipped.
+ std::set<ProxyServer> preconnecting_proxy_servers_;
+
SpdySessionRequestMap spdy_session_request_map_;
const bool for_websockets_;
+
+ // True if only one preconnect is allowed to proxy servers that support
+ // request priorities.
+ const bool allow_only_one_preconnect_to_proxy_servers_;
+
DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
};
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698