Chromium Code Reviews| 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 db1e572672b3f2efee0a1f4238266ac88bdd536f..a4c6f41b90440453a372f9eb881e6c3fa907f1d7 100644 |
| --- a/net/http/http_stream_factory_impl_job_controller.h |
| +++ b/net/http/http_stream_factory_impl_job_controller.h |
| @@ -133,6 +133,16 @@ class HttpStreamFactoryImpl::JobController |
| Job* job, |
| const ConnectionAttempts& attempts) override; |
| + // Invoked to resume the main job when |job| initiates a connection but |
| + // does not succeed. |
| + void OnInitConnectionNotSuccessful(Job* job, |
| + const base::TimeDelta& delay) override; |
| + |
| + // Return false if |job| has no blocking job and there's no wait time, |
| + // i.e., |job| won't call Job::ResumeAfterDelay(). Else true and resume |
| + // |job| with appropriate wait time. |
| + bool ShoudWait(Job* job) const override; |
| + |
| // Called when |job| determines the appropriate |spdy_session_key| for the |
| // Request. Note that this does not mean that SPDY is necessarily supported |
| // for this SpdySessionKey, since we may need to wait for NPN to complete |
| @@ -143,6 +153,11 @@ class HttpStreamFactoryImpl::JobController |
| // Remove session from the SpdySessionRequestMap. |
| void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override; |
| const BoundNetLog* GetNetLog(Job* job) const override; |
| + |
| + const base::TimeDelta& wait_time_for_main_job() const override; |
| + void set_wait_time_for_main_job(const base::TimeDelta& delay) override; |
| + bool blocking() override; |
| + |
| WebSocketHandshakeStreamBase::CreateHelper* |
| websocket_handshake_stream_create_helper() override; |
| @@ -184,6 +199,9 @@ class HttpStreamFactoryImpl::JobController |
| void MaybeNotifyFactoryOfCompletion(); |
| + // Called to resume the alternative job. |
| + void MaybeResumeOtherJob(Job* job, const base::TimeDelta& delay); |
|
Ryan Hamilton
2016/06/29 23:12:28
I think this can only resume the *main* job, right
Zhongyi Shi
2016/06/30 22:53:39
Urgh, right! it should resume the main job only!
|
| + |
| // Returns true if QUIC is whitelisted for |host|. |
| bool IsQuicWhitelistedForHost(const std::string& host); |
| @@ -224,6 +242,10 @@ class HttpStreamFactoryImpl::JobController |
| // True if a Job has ever been bound to the |request_|. |
| bool job_bound_; |
| + // True if the |main_job_| has to wait for |alternative_job_|; |
| + bool blocking_; |
|
Ryan Hamilton
2016/06/29 23:12:28
nit: main_job_is_blocked_;
|
| + base::TimeDelta wait_time_; |
|
Ryan Hamilton
2016/06/29 23:12:28
nit: main_job_wait_time_? (or some such)
Can you
|
| + |
| // At the point where a Job is irrevocably tied to |request_|, we set this. |
| // It will be nulled when the |request_| is finished. |
| Job* bound_job_; |