| 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..726691282f152dcbc0ab6a3fba1bff7aebc7ca5c 100644
|
| --- a/net/http/http_stream_factory_impl_job_controller.cc
|
| +++ b/net/http/http_stream_factory_impl_job_controller.cc
|
| @@ -28,6 +28,10 @@
|
|
|
| namespace net {
|
|
|
| +// The maximum time to wait for the alternate job to complete before resuming
|
| +// the main job.
|
| +const int kMaxDelayTimeForMainJobSecs = 3;
|
| +
|
| std::unique_ptr<base::Value> NetLogJobControllerCallback(
|
| const GURL* url,
|
| bool is_preconnect,
|
| @@ -659,8 +663,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_ = std::min(
|
| + delay, base::TimeDelta::FromSeconds(kMaxDelayTimeForMainJobSecs));
|
| + }
|
| }
|
|
|
| bool HttpStreamFactoryImpl::JobController::HasPendingMainJob() const {
|
|
|