| Index: content/browser/frame_host/interstitial_page_impl.cc
|
| diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
|
| index c45eb6968daf8d1e5e3e70fc85540f84c39463f5..6bb900b41b761d73ab7d98a13c2cebe5aaa74cf6 100644
|
| --- a/content/browser/frame_host/interstitial_page_impl.cc
|
| +++ b/content/browser/frame_host/interstitial_page_impl.cc
|
| @@ -19,6 +19,7 @@
|
| #include "content/browser/frame_host/interstitial_page_navigator_impl.h"
|
| #include "content/browser/frame_host/navigation_controller_impl.h"
|
| #include "content/browser/frame_host/navigation_entry_impl.h"
|
| +#include "content/browser/loader/loader_io_thread_notifier.h"
|
| #include "content/browser/loader/resource_dispatcher_host_impl.h"
|
| #include "content/browser/renderer_host/render_process_host_impl.h"
|
| #include "content/browser/renderer_host/render_view_host_delegate_view.h"
|
| @@ -52,19 +53,20 @@ using blink::WebDragOperationsMask;
|
| namespace content {
|
| namespace {
|
|
|
| -void ResourceRequestHelper(ResourceDispatcherHostImpl* rdh,
|
| - int process_id,
|
| - int render_view_host_id,
|
| - ResourceRequestAction action) {
|
| +void ResourceRequestHelper(
|
| + ResourceRequestAction action,
|
| + ResourceDispatcherHostImpl* rdh,
|
| + int child_id,
|
| + int route_id) {
|
| switch (action) {
|
| case BLOCK:
|
| - rdh->BlockRequestsForRoute(process_id, render_view_host_id);
|
| + rdh->BlockRequestsForFrame(child_id, route_id);
|
| break;
|
| case RESUME:
|
| - rdh->ResumeBlockedRequestsForRoute(process_id, render_view_host_id);
|
| + rdh->ResumeBlockedRequestsForFrame(child_id, route_id);
|
| break;
|
| case CANCEL:
|
| - rdh->CancelBlockedRequestsForRoute(process_id, render_view_host_id);
|
| + rdh->CancelBlockedRequestsForFrame(child_id, route_id);
|
| break;
|
| default:
|
| NOTREACHED();
|
| @@ -836,22 +838,16 @@ void InterstitialPageImpl::TakeActionOnResourceDispatcher(
|
| // The tab might not have a render_view_host if it was closed (in which case,
|
| // we have taken care of the blocked requests when processing
|
| // NOTIFY_RENDER_WIDGET_HOST_DESTROYED.
|
| - // Also we need to test there is a ResourceDispatcherHostImpl, as when unit-
|
| - // tests we don't have one.
|
| + // LoaderIOThreadNotifier tests if there is a ResourceDispatcherHostImpl, as
|
| + // unit-tests don't have one.
|
| RenderViewHostImpl* rvh = RenderViewHostImpl::FromID(original_child_id_,
|
| original_rvh_id_);
|
| - if (!rvh || !ResourceDispatcherHostImpl::Get())
|
| + if (!rvh)
|
| return;
|
|
|
| - BrowserThread::PostTask(
|
| - BrowserThread::IO,
|
| - FROM_HERE,
|
| - base::Bind(
|
| - &ResourceRequestHelper,
|
| - ResourceDispatcherHostImpl::Get(),
|
| - original_child_id_,
|
| - original_rvh_id_,
|
| - action));
|
| + LoaderIOThreadNotifer::NotifyForEachFrameOnIO(
|
| + rvh->GetDelegate()->GetFrameTree(),
|
| + base::Bind(&ResourceRequestHelper, action));
|
| }
|
|
|
| void InterstitialPageImpl::OnDomOperationResponse(
|
|
|