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

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

Issue 1542743002: [RDHI] Refactored blocked_loaders_map_ to key by render frame route id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 12 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
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..e0f36a9e2924e71e30f234b527acee7b34bc0ef3 100644
--- a/extensions/browser/app_window/app_window_contents.cc
+++ b/extensions/browser/app_window/app_window_contents.cc
@@ -9,6 +9,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/loader_io_thread_notifier.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -89,14 +90,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::LoaderIOThreadNotifier::ResumeBlockedRequestsForFrame(
+ web_contents_->GetMainFrame());
}
}
@@ -136,14 +131,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::LoaderIOThreadNotifier::BlockRequestsForFrame(rfh);
nasko 2016/01/07 00:43:09 Can we stick those methods on an existing class th
Charlie Harrison 2016/01/07 22:47:06 Yeah, I think I'll merge the LoaderIOThreadNotifie
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698