Chromium Code Reviews| 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()) && |