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

Unified Diff: content/browser/loader/navigation_resource_throttle.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/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 =

Powered by Google App Engine
This is Rietveld 408576698