Index: content/browser/loader/navigation_resource_throttle.cc |
diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc |
index 6a7f6b6688ed16a84c9d65a217ecfba6a8e24d05..a2aa8aaa1227052a63bbc73fb4d391eac96e7c7d 100644 |
--- a/content/browser/loader/navigation_resource_throttle.cc |
+++ b/content/browser/loader/navigation_resource_throttle.cc |
@@ -204,8 +204,11 @@ void NavigationResourceThrottle::WillStartRequest(bool* defer) { |
return; |
bool is_external_protocol = |
- !info->GetContext()->GetRequestContext()->job_factory()->IsHandledURL( |
- request_->url()); |
+ request_->url().is_valid() && |
+ !info->GetContext() |
+ ->GetRequestContext() |
+ ->job_factory() |
+ ->IsHandledProtocol(request_->url().scheme()); |
mmenke
2017/03/31 04:30:04
This duplication seems ugly, but with PlzNavigate,
asanka
2017/03/31 20:38:30
Acknowledged.
|
UIChecksPerformedCallback callback = |
base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed, |
weak_ptr_factory_.GetWeakPtr()); |
@@ -239,8 +242,11 @@ void NavigationResourceThrottle::WillRedirectRequest( |
return; |
bool new_is_external_protocol = |
- !info->GetContext()->GetRequestContext()->job_factory()->IsHandledURL( |
- request_->url()); |
+ request_->url().is_valid() && |
+ !info->GetContext() |
+ ->GetRequestContext() |
+ ->job_factory() |
+ ->IsHandledProtocol(request_->url().scheme()); |
DCHECK(redirect_info.new_method == "POST" || |
redirect_info.new_method == "GET"); |
UIChecksPerformedCallback callback = |