| 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 2e0dffb8b400b475fcb6e3c5233680fcdeaf8095..052a17e3da2ab5a6d5a396109eb900c3d88ba903 100644
|
| --- a/net/http/http_stream_factory_impl_job_controller.cc
|
| +++ b/net/http/http_stream_factory_impl_job_controller.cc
|
| @@ -50,7 +50,6 @@
|
| alternative_job_failed_(false),
|
| job_bound_(false),
|
| main_job_is_blocked_(false),
|
| - main_job_is_resumed_(false),
|
| bound_job_(nullptr),
|
| can_start_alternative_proxy_job_(false),
|
| ptr_factory_(this) {
|
| @@ -517,10 +516,6 @@
|
| }
|
|
|
| void HttpStreamFactoryImpl::JobController::ResumeMainJob() {
|
| - if (main_job_is_resumed_)
|
| - return;
|
| -
|
| - main_job_is_resumed_ = true;
|
| main_job_->net_log().AddEvent(
|
| NetLogEventType::HTTP_STREAM_JOB_DELAYED,
|
| base::Bind(&NetLogHttpStreamJobDelayCallback, main_job_wait_time_));
|
| @@ -532,24 +527,15 @@
|
| void HttpStreamFactoryImpl::JobController::MaybeResumeMainJob(
|
| Job* job,
|
| const base::TimeDelta& delay) {
|
| - DCHECK(delay == base::TimeDelta() || delay == main_job_wait_time_);
|
| DCHECK(job == main_job_.get() || job == alternative_job_.get());
|
|
|
| - if (job != alternative_job_.get() || !main_job_)
|
| + if (!main_job_is_blocked_ || job != alternative_job_.get() || !main_job_)
|
| return;
|
|
|
| main_job_is_blocked_ = false;
|
|
|
| - if (!main_job_->is_waiting()) {
|
| - // There are two cases where the main job is not in WAIT state:
|
| - // 1) The main job hasn't got to waiting state, do not yet post a task to
|
| - // resume since that will happen in ShouldWait().
|
| - // 2) The main job has passed waiting state, so the main job does not need
|
| - // to be resumed.
|
| - return;
|
| - }
|
| -
|
| - main_job_wait_time_ = delay;
|
| + if (!main_job_->is_waiting())
|
| + return;
|
|
|
| base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
|
| FROM_HERE,
|
|
|