| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_stream_factory_impl_job_controller.h" | 5 #include "net/http/http_stream_factory_impl_job_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 if (is_preconnect_ || IsJobOrphaned(job)) | 614 if (is_preconnect_ || IsJobOrphaned(job)) |
| 615 return; | 615 return; |
| 616 | 616 |
| 617 RemoveRequestFromSpdySessionRequestMap(); | 617 RemoveRequestFromSpdySessionRequestMap(); |
| 618 } | 618 } |
| 619 | 619 |
| 620 void HttpStreamFactoryImpl::JobController:: | 620 void HttpStreamFactoryImpl::JobController:: |
| 621 RemoveRequestFromSpdySessionRequestMap() { | 621 RemoveRequestFromSpdySessionRequestMap() { |
| 622 // TODO(xunjieli): Use a DCHECK once https://crbug.com/718576 is fixed. | 622 // TODO(xunjieli): Use a DCHECK once https://crbug.com/718576 is fixed. |
| 623 CHECK(request_); | 623 CHECK(request_); |
| 624 if (!request_->HasSpdySessionKey()) |
| 625 return; |
| 626 // If the request failed or canceled, open the floodgate to resume all |
| 627 // requests. |
| 628 session_->spdy_session_pool()->ResumeAllPendingRequests( |
| 629 request_->GetSpdySessionKey()); |
| 630 |
| 624 session_->spdy_session_pool()->RemoveRequestFromSpdySessionRequestMap( | 631 session_->spdy_session_pool()->RemoveRequestFromSpdySessionRequestMap( |
| 625 request_); | 632 request_); |
| 626 } | 633 } |
| 627 | 634 |
| 628 const NetLogWithSource* HttpStreamFactoryImpl::JobController::GetNetLog() | 635 const NetLogWithSource* HttpStreamFactoryImpl::JobController::GetNetLog() |
| 629 const { | 636 const { |
| 630 return &net_log_; | 637 return &net_log_; |
| 631 } | 638 } |
| 632 | 639 |
| 633 void HttpStreamFactoryImpl::JobController::MaybeSetWaitTimeForMainJob( | 640 void HttpStreamFactoryImpl::JobController::MaybeSetWaitTimeForMainJob( |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 // If ReconsiderProxyAfterError() failed synchronously, it means | 1292 // If ReconsiderProxyAfterError() failed synchronously, it means |
| 1286 // there was nothing left to fall-back to, so fail the transaction | 1293 // there was nothing left to fall-back to, so fail the transaction |
| 1287 // with the last connection error we got. | 1294 // with the last connection error we got. |
| 1288 // TODO(eroman): This is a confusing contract, make it more obvious. | 1295 // TODO(eroman): This is a confusing contract, make it more obvious. |
| 1289 rv = error; | 1296 rv = error; |
| 1290 } | 1297 } |
| 1291 return rv; | 1298 return rv; |
| 1292 } | 1299 } |
| 1293 | 1300 |
| 1294 } // namespace net | 1301 } // namespace net |
| OLD | NEW |