summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/loader/navigation_url_loader_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/loader/navigation_url_loader_impl.cc')
-rw-r--r--chromium/content/browser/loader/navigation_url_loader_impl.cc26
1 files changed, 8 insertions, 18 deletions
diff --git a/chromium/content/browser/loader/navigation_url_loader_impl.cc b/chromium/content/browser/loader/navigation_url_loader_impl.cc
index eb08165b270..47c7fb628bb 100644
--- a/chromium/content/browser/loader/navigation_url_loader_impl.cc
+++ b/chromium/content/browser/loader/navigation_url_loader_impl.cc
@@ -323,17 +323,6 @@ void UnknownSchemeCallback(
handled_externally ? net::ERR_ABORTED : net::ERR_UNKNOWN_URL_SCHEME));
}
-// Returns whether this URL can be handled by the default network service
-// URLLoader.
-bool IsURLHandledByDefaultLoader(const GURL& url) {
- // Data URLs are only handled by the network service if
- // |enable_data_url_support| is set in NetworkContextParams. This is set to
- // true for the context used by NavigationURLLoaderImpl, so in addition to
- // checking whether the URL is handled by the network service, we also need to
- // check for the data scheme.
- return IsURLHandledByNetworkService(url) || url.SchemeIs(url::kDataScheme);
-}
-
// Determines whether it is safe to redirect from |from_url| to |to_url|.
bool IsRedirectSafe(const GURL& from_url,
const GURL& to_url,
@@ -801,8 +790,8 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
if (!default_loader_used_ ||
(base::FeatureList::IsEnabled(network::features::kNetworkService) &&
url_chain_.size() > 1 &&
- IsURLHandledByDefaultLoader(url_chain_[url_chain_.size() - 1]) !=
- IsURLHandledByDefaultLoader(url_chain_[url_chain_.size() - 2]))) {
+ IsURLHandledByNetworkService(url_chain_[url_chain_.size() - 1]) !=
+ IsURLHandledByNetworkService(url_chain_[url_chain_.size() - 2]))) {
url_loader_.reset();
}
interceptor_index_ = 0;
@@ -985,7 +974,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
// further refactor the factory getters to avoid this.
scoped_refptr<network::SharedURLLoaderFactory> factory;
- if (!IsURLHandledByDefaultLoader(resource_request_->url)) {
+ if (!IsURLHandledByNetworkService(resource_request_->url)) {
if (known_schemes_.find(resource_request_->url.scheme()) ==
known_schemes_.end()) {
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
@@ -1675,8 +1664,9 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
bool use_proxy = GetContentClient()->browser()->WillCreateURLLoaderFactory(
partition->browser_context(), frame_tree_node->current_frame_host(),
frame_tree_node->current_frame_host()->GetProcess()->GetID(),
- true /* is_navigation */, navigation_request_initiator,
- &factory_request, &header_client, &bypass_redirect_checks);
+ true /* is_navigation */, false /* is_download */,
+ navigation_request_initiator, &factory_request, &header_client,
+ &bypass_redirect_checks);
if (devtools_instrumentation::WillCreateURLLoaderFactory(
frame_tree_node->current_frame_host(), true /* is_navigation */,
false /* is_download */, &factory_request)) {
@@ -1854,8 +1844,8 @@ void NavigationURLLoaderImpl::BindNonNetworkURLLoaderFactoryRequest(
GetContentClient()->browser()->WillCreateURLLoaderFactory(
frame->GetSiteInstance()->GetBrowserContext(), frame,
frame->GetProcess()->GetID(), true /* is_navigation */,
- navigation_request_initiator, &factory, nullptr /* header_client */,
- nullptr /* bypass_redirect_checks */);
+ false /* is_download */, navigation_request_initiator, &factory,
+ nullptr /* header_client */, nullptr /* bypass_redirect_checks */);
it->second->Clone(std::move(factory));
}