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 9e63d829f1ae2fa5b32dbb9a8aeae248441e0e42..428cf9ee247117902d6a7a7dc2cdb6133bcddf53 100644 |
--- a/content/browser/frame_host/interstitial_page_impl.cc |
+++ b/content/browser/frame_host/interstitial_page_impl.cc |
@@ -22,6 +22,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_impl.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" |
@@ -55,19 +56,18 @@ 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, |
+ const GlobalFrameRoutingId& routing_id) { |
switch (action) { |
case BLOCK: |
- rdh->BlockRequestsForRoute(process_id, render_view_host_id); |
+ rdh->BlockRequestsForFrame(routing_id); |
break; |
case RESUME: |
- rdh->ResumeBlockedRequestsForRoute(process_id, render_view_host_id); |
+ rdh->ResumeBlockedRequestsForFrame(routing_id); |
break; |
case CANCEL: |
- rdh->CancelBlockedRequestsForRoute(process_id, render_view_host_id); |
+ rdh->CancelBlockedRequestsForFrame(routing_id); |
break; |
default: |
NOTREACHED(); |
@@ -839,22 +839,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 |
Randy Smith (Not in Mondays)
2016/01/06 21:56:29
This comment seems wrong to me--LIOTN isn't testin
Charlie Harrison
2016/01/07 22:47:05
This code tests that we have a rvh. The LIOTN test
|
+ // 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)); |
+ LoaderIOThreadNotifierImpl::NotifyForEachFrame( |
+ rvh->GetDelegate()->GetFrameTree(), |
+ base::Bind(&ResourceRequestHelper, action)); |
} |
void InterstitialPageImpl::OnDomOperationResponse( |