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 e14ad0a44efbb4ba45dfaff5223ae47f043d24d4..26d694da9cd34ecc4e4e402a7380f7dc66a5b8ea 100644 |
| --- a/net/http/http_stream_factory_impl_job_controller.h |
| +++ b/net/http/http_stream_factory_impl_job_controller.h |
| @@ -49,7 +49,7 @@ class HttpStreamFactoryImpl::JobController { |
| void SetPriority(RequestPriority priority); |
| - // Methods below are called by HttpStreamFactoryImpl::Job only. |
| + // Methods below are called by HttpStreamFactoryImpl::Job only |
| void OnStreamReady(Job* job, |
| const SSLConfig& used_ssl_config, |
| const ProxyInfo& used_proxy_info); |
| @@ -113,8 +113,23 @@ class HttpStreamFactoryImpl::JobController { |
| // Remove session from the SpdySessionRequestMap. |
| void RemoveRequestFromSpdySessionRequestMapForJob(Job* job); |
| + void MaybeResumeOtherJob(Job* job, const base::TimeDelta& delay); |
| + |
| + void SetWaitTimeForMainJob(const base::TimeDelta& delay) { |
| + wait_time_ = delay; |
|
Ryan Hamilton
2016/05/17 22:14:09
nit: wait_time_for_main_job_ and set_wait_time_fo
Zhongyi Shi
2016/06/29 21:49:03
Done.
|
| + } |
| + |
| + const base::TimeDelta& GetWaitTime() const { return wait_time_; } |
| + |
| + // Resume |job| with appropriate wait time. Return false if |job| has no |
| + // blocking job and there's no wait time, i.e., |job| won't call |
| + // Job::ResumeAfterDelay(). |
| + bool ResumeJobWithDelay(Job* job) const; |
| + |
| const BoundNetLog* GetNetLog(Job* job) const; |
| + bool blocking() { return blocking_; } |
| + |
| WebSocketHandshakeStreamBase::CreateHelper* |
| websocket_handshake_stream_create_helper(); |
| @@ -194,6 +209,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/05/17 22:14:09
Can you expand this comment a bit? Under what circ
|
| + base::TimeDelta wait_time_; |
|
Ryan Hamilton
2016/05/17 22:14:09
Comment?
|
| + |
| // 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_; |