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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2283473002: Fixes for the failing URLLoaderFactoryImplTest content_unittests with PlzNavigate enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « content/browser/loader/DEPS ('k') | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 847f0fd5f9d82e6dd5d54a4e4db3d75360c35fde..31a002d3f6580d48e6488affc903aab37e818cd9 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1282,8 +1282,8 @@ void ResourceDispatcherHostImpl::BeginRequest(
bool is_navigation_stream_request =
IsBrowserSideNavigationEnabled() &&
IsResourceTypeFrame(request_data.resource_type);
- if (is_navigation_stream_request &&
- !request_data.resource_body_stream_url.SchemeIs(url::kBlobScheme)) {
+ if ((process_type == PROCESS_TYPE_RENDERER) && is_navigation_stream_request
clamy 2016/08/25 22:17:55 Could you add a comment explaining that this is du
ananta 2016/08/25 22:49:15 Done.
+ && !request_data.resource_body_stream_url.SchemeIs(url::kBlobScheme)) {
bad_message::ReceivedBadMessage(filter_, bad_message::RDH_INVALID_URL);
return;
}
@@ -1398,7 +1398,8 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
bool is_navigation_stream_request =
IsBrowserSideNavigationEnabled() &&
- IsResourceTypeFrame(request_data.resource_type);
+ IsResourceTypeFrame(request_data.resource_type) &&
+ process_type == PROCESS_TYPE_RENDERER;
ResourceContext* resource_context = NULL;
net::URLRequestContext* request_context = NULL;
@@ -1687,7 +1688,8 @@ ResourceDispatcherHostImpl::AddStandardHandlers(
// PlzNavigate: do not add ResourceThrottles for main resource requests from
// the renderer. Decisions about the navigation should have been done in the
// initial request.
- if (IsBrowserSideNavigationEnabled() && IsResourceTypeFrame(resource_type) &&
+ if ((filter_->process_type() == PROCESS_TYPE_RENDERER) &&
+ IsBrowserSideNavigationEnabled() && IsResourceTypeFrame(resource_type) &&
child_id != -1) {
DCHECK(request->url().SchemeIs(url::kBlobScheme));
return handler;
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698