Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: extensions/browser/app_window/app_window_contents.cc

Issue 1567903002: [Test - Do Not Commit] Stop blocking requests for new windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge onto #371523 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/app_window/app_window_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/app_window/app_window_contents.cc
diff --git a/extensions/browser/app_window/app_window_contents.cc b/extensions/browser/app_window/app_window_contents.cc
index 3419326f867c67d06df0d51c5bf462f8de4a8f41..9f67afd7901d1a3a5b1b7b00ce4856679d479250 100644
--- a/extensions/browser/app_window/app_window_contents.cc
+++ b/extensions/browser/app_window/app_window_contents.cc
@@ -22,7 +22,7 @@
namespace extensions {
AppWindowContentsImpl::AppWindowContentsImpl(AppWindow* host)
- : host_(host), is_blocking_requests_(false), is_window_ready_(false) {}
+ : host_(host), is_window_ready_(false) {}
AppWindowContentsImpl::~AppWindowContentsImpl() {}
@@ -41,19 +41,6 @@ void AppWindowContentsImpl::Initialize(content::BrowserContext* context,
}
void AppWindowContentsImpl::LoadContents(int32_t creator_process_id) {
- // If the new view is in the same process as the creator, block the created
- // RVH from loading anything until the background page has had a chance to
- // do any initialization it wants. If it's a different process, the new RVH
- // shouldn't communicate with the background page anyway (e.g. sandboxed).
- if (web_contents_->GetMainFrame()->GetProcess()->GetID() ==
- creator_process_id) {
- SuspendRenderFrameHost(web_contents_->GetMainFrame());
- } else {
- VLOG(1) << "AppWindow created in new process ("
- << web_contents_->GetMainFrame()->GetProcess()->GetID()
- << ") != creator (" << creator_process_id << "). Routing disabled.";
- }
-
web_contents_->GetController().LoadURL(
url_, content::Referrer(), ui::PAGE_TRANSITION_LINK,
std::string());
@@ -87,17 +74,6 @@ void AppWindowContentsImpl::DispatchWindowShownForTests() const {
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::WebContents* AppWindowContentsImpl::GetWebContents() const {
@@ -129,21 +105,4 @@ void AppWindowContentsImpl::UpdateDraggableRegions(
host_->UpdateDraggableRegions(regions);
}
-void AppWindowContentsImpl::SuspendRenderFrameHost(
- content::RenderFrameHost* rfh) {
- DCHECK(rfh);
- // Don't bother blocking requests if the renderer side is already good to go.
- 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()));
-}
-
} // namespace extensions
« no previous file with comments | « extensions/browser/app_window/app_window_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698