Index: net/http/http_stream_factory_impl_job.h |
diff --git a/net/http/http_stream_factory_impl_job.h b/net/http/http_stream_factory_impl_job.h |
index d04cc51072dfb351f1ff84c1188b3aeddc51eb29..69bf4ca32bd3a40de2a9cdc154eb68cd6e914d8f 100644 |
--- a/net/http/http_stream_factory_impl_job.h |
+++ b/net/http/http_stream_factory_impl_job.h |
@@ -6,6 +6,7 @@ |
#define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
#include <memory> |
+#include <utility> |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
@@ -257,23 +258,19 @@ class HttpStreamFactoryImpl::Job { |
STATE_RESOLVE_PROXY, |
STATE_RESOLVE_PROXY_COMPLETE, |
- // Note that when Alternate-Protocol says we can connect to an alternate |
- // port using a different protocol, we have the choice of communicating over |
- // the original protocol, or speaking the alternate protocol (currently, |
- // only npn-spdy) over an alternate port. For a cold page load, the http |
- // connection that delivers the http response that has the |
- // Alternate-Protocol header will already be warm. So, blocking the next |
- // http request on establishing a new npn-spdy connection would incur extra |
- // latency. Even if the http connection was not reused, establishing a new |
- // http connection is typically faster than npn-spdy, since npn-spdy |
Bence
2016/09/22 19:30:32
This is obsolete: Alt-Svc is only allowed for http
|
- // requires a SSL handshake. Therefore, we start both the http and the |
- // npn-spdy jobs in parallel. In order not to unnecessarily waste sockets, |
- // we have the http job block on the npn-spdy job after proxy resolution. |
- // The npn-spdy job will Resume() the http job if, in |
- // STATE_INIT_CONNECTION_COMPLETE, it detects an error or does not find an |
- // existing SpdySession. In that case, the http and npn-spdy jobs will race. |
- // When QUIC protocol is used by the npn-spdy job, then http job will wait |
- // for |wait_time_| when the http job was resumed. |
+ // The main and alternative jobs are started in parallel. The main job |
+ // waits after it finishes proxy resolution. The alternative job never |
+ // waits. |
+ // |
+ // An HTTP/2 alternative job notifies the JobController in DoInitConnection |
+ // unless it can pool to an existing SpdySession. JobController, in turn, |
+ // resumes the main job. |
+ // |
+ // A QUIC alternative job notifies the JobController in DoInitConnection |
+ // regardless of whether it pools to an existing QUIC session, but the main |
+ // job is only resumed after some delay. |
+ // |
+ // If the main job is resumed, then it races the alternative job. |
STATE_WAIT, |
STATE_WAIT_COMPLETE, |
@@ -376,9 +373,6 @@ class HttpStreamFactoryImpl::Job { |
// Called to handle a client certificate request. |
int HandleCertificateRequest(int error); |
- // Moves this stream request into SPDY mode. |
- void SwitchToSpdyMode(); |
- |
// Should we force QUIC for this stream request. |
bool ShouldForceQuic() const; |