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

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

Issue 2783343002: Remove URLRequestJobFactory::IsHandledURL. (Closed)
Patch Set: More fixes..... Created 3 years, 9 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: 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 dc7074a67fd2b787f15412fb662a62a27b2bff9c..4747b4aa64a7bf6ad06df96573bda326df396371 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -578,7 +578,7 @@ bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader,
const net::URLRequestJobFactory* job_factory =
info->GetContext()->GetRequestContext()->job_factory();
- if (job_factory->IsHandledURL(url))
+ if (!url.is_valid() || job_factory->IsHandledProtocol(url.scheme()))
mmenke 2017/03/31 04:30:04 I hope to remove the calls when moving launching p
asanka 2017/03/31 20:38:30 Acknowledged.
return false;
return delegate_->HandleExternalProtocol(url, info);
@@ -1935,8 +1935,9 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
bool is_external_protocol =
- !resource_context->GetRequestContext()->job_factory()->IsHandledURL(
- info.common_params.url);
+ info.common_params.url.is_valid() &&
+ !resource_context->GetRequestContext()->job_factory()->IsHandledProtocol(
+ info.common_params.url.scheme());
bool non_web_url_in_guest =
info.is_for_guests_only &&
!policy->IsWebSafeScheme(info.common_params.url.scheme()) &&

Powered by Google App Engine
This is Rietveld 408576698