| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 // browser-owned requests are the only requests that aren't cancelled when | 576 // browser-owned requests are the only requests that aren't cancelled when |
| 577 // the associated processes go away. It may be OK for this invariant to | 577 // the associated processes go away. It may be OK for this invariant to |
| 578 // change in the future, but if this assertion fires without the invariant | 578 // change in the future, but if this assertion fires without the invariant |
| 579 // changing, then it's indicative of a leak. | 579 // changing, then it's indicative of a leak. |
| 580 DCHECK( | 580 DCHECK( |
| 581 loader->GetRequestInfo()->IsDownload() || | 581 loader->GetRequestInfo()->IsDownload() || |
| 582 loader->GetRequestInfo()->is_stream() || | 582 loader->GetRequestInfo()->is_stream() || |
| 583 (loader->GetRequestInfo()->detachable_handler() && | 583 (loader->GetRequestInfo()->detachable_handler() && |
| 584 loader->GetRequestInfo()->detachable_handler()->is_detached()) || | 584 loader->GetRequestInfo()->detachable_handler()->is_detached()) || |
| 585 loader->GetRequestInfo()->requester_info()->IsBrowserSideNavigation() || | 585 loader->GetRequestInfo()->requester_info()->IsBrowserSideNavigation() || |
| 586 loader->is_transferring()); | 586 loader->is_transferring() || |
| 587 loader->GetRequestInfo()->GetResourceType() == |
| 588 RESOURCE_TYPE_SERVICE_WORKER); |
| 587 } | 589 } |
| 588 #endif | 590 #endif |
| 589 | 591 |
| 590 loaders_to_cancel.clear(); | 592 loaders_to_cancel.clear(); |
| 591 | 593 |
| 592 if (async_revalidation_manager_) { | 594 if (async_revalidation_manager_) { |
| 593 // Cancelling async revalidations should not result in the creation of new | 595 // Cancelling async revalidations should not result in the creation of new |
| 594 // requests. Do it before the CHECKs to ensure this does not happen. | 596 // requests. Do it before the CHECKs to ensure this does not happen. |
| 595 async_revalidation_manager_->CancelAsyncRevalidationsForResourceContext( | 597 async_revalidation_manager_->CancelAsyncRevalidationsForResourceContext( |
| 596 context); | 598 context); |
| (...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 &throttles); | 2794 &throttles); |
| 2793 if (!throttles.empty()) { | 2795 if (!throttles.empty()) { |
| 2794 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2796 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 2795 std::move(throttles))); | 2797 std::move(throttles))); |
| 2796 } | 2798 } |
| 2797 } | 2799 } |
| 2798 return handler; | 2800 return handler; |
| 2799 } | 2801 } |
| 2800 | 2802 |
| 2801 } // namespace content | 2803 } // namespace content |
| OLD | NEW |