diff options
author | csharrison <csharrison@chromium.org> | 2016-02-03 15:21:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-03 23:22:24 +0000 |
commit | a2280cd27bd434f6033d3ab0c70886c06e3882b0 (patch) | |
tree | f1782025e9a46e1018c81f423cce43afbe728a4d /extensions/browser/app_window | |
parent | 34cfec966c191e72364f6ba1435e67d11d7b3c01 (diff) | |
download | chromium_src-a2280cd27bd434f6033d3ab0c70886c06e3882b0.zip chromium_src-a2280cd27bd434f6033d3ab0c70886c06e3882b0.tar.gz chromium_src-a2280cd27bd434f6033d3ab0c70886c06e3882b0.tar.bz2 |
Refactored blocked_loaders_map_ to key by render frame route id
This change is a necessary step to completely refactor out render view ids from the ResourceDispatcherHostImpl.
This means that the interface to block, resume, or cancel requests now require passing in the frame routing id and the child id.
The ResourceScheduler, SaveFile, and Downloads still use the RVID.
BUG=472869
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Review URL: https://codereview.chromium.org/1542743002
Cr-Commit-Position: refs/heads/master@{#373380}
Diffstat (limited to 'extensions/browser/app_window')
-rw-r--r-- | extensions/browser/app_window/app_window_contents.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/extensions/browser/app_window/app_window_contents.cc b/extensions/browser/app_window/app_window_contents.cc index 3419326..7f1a7a1 100644 --- a/extensions/browser/app_window/app_window_contents.cc +++ b/extensions/browser/app_window/app_window_contents.cc @@ -89,14 +89,8 @@ void AppWindowContentsImpl::OnWindowReady() { is_window_ready_ = true; if (is_blocking_requests_) { is_blocking_requests_ = false; - content::RenderFrameHost* frame = web_contents_->GetMainFrame(); - content::BrowserThread::PostTask( - content::BrowserThread::IO, FROM_HERE, - base::Bind( - &content::ResourceDispatcherHost::ResumeBlockedRequestsForRoute, - base::Unretained(content::ResourceDispatcherHost::Get()), - frame->GetProcess()->GetID(), - frame->GetRenderViewHost()->GetRoutingID())); + content::ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI( + web_contents_->GetMainFrame()); } } @@ -136,14 +130,7 @@ void AppWindowContentsImpl::SuspendRenderFrameHost( if (is_window_ready_) return; is_blocking_requests_ = true; - // The ResourceDispatcherHost only accepts RenderViewHost child ids. - // TODO(devlin): This will need to change for site isolation. - content::BrowserThread::PostTask( - content::BrowserThread::IO, FROM_HERE, - base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, - base::Unretained(content::ResourceDispatcherHost::Get()), - rfh->GetProcess()->GetID(), - rfh->GetRenderViewHost()->GetRoutingID())); + content::ResourceDispatcherHost::BlockRequestsForFrameFromUI(rfh); } } // namespace extensions |