| Index: net/http/http_stream_factory_impl_job_controller.cc
|
| diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
|
| index 0bb08374dc8e90f0946600b1767183bc6d0f53c6..5a3616a1f07e3b58bed2a112c5b732c1cb38bdef 100644
|
| --- a/net/http/http_stream_factory_impl_job_controller.cc
|
| +++ b/net/http/http_stream_factory_impl_job_controller.cc
|
| @@ -28,6 +28,9 @@
|
|
|
| namespace net {
|
|
|
| +// The max time to delay the main job if is delayed TCP case.
|
| +const base::TimeDelta kMaxDelayTimeForMainJob = base::TimeDelta::FromSeconds(3);
|
| +
|
| std::unique_ptr<base::Value> NetLogJobControllerCallback(
|
| const GURL* url,
|
| bool is_preconnect,
|
| @@ -659,8 +662,10 @@ const NetLogWithSource* HttpStreamFactoryImpl::JobController::GetNetLog(
|
|
|
| void HttpStreamFactoryImpl::JobController::MaybeSetWaitTimeForMainJob(
|
| const base::TimeDelta& delay) {
|
| - if (main_job_is_blocked_)
|
| - main_job_wait_time_ = delay;
|
| + if (main_job_is_blocked_) {
|
| + main_job_wait_time_ =
|
| + delay > kMaxDelayTimeForMainJob ? kMaxDelayTimeForMainJob : delay;
|
| + }
|
| }
|
|
|
| bool HttpStreamFactoryImpl::JobController::HasPendingMainJob() const {
|
|
|