refactor: nws13n: session.allowNTLMCredentialsForDomains (#18129)

This commit is contained in:
Jeremy Apthorp 2019-05-29 16:43:06 -07:00 committed by GitHub
parent f4c792d014
commit 2dbd2c07e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 21 deletions

View file

@ -42,6 +42,10 @@ network::mojom::HttpAuthStaticParamsPtr CreateHttpAuthStaticParams() {
return auth_static_params;
}
} // namespace
namespace atom {
network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams() {
auto* command_line = base::CommandLine::ForCurrentProcess();
network::mojom::HttpAuthDynamicParamsPtr auth_dynamic_params =
@ -57,7 +61,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams() {
return auth_dynamic_params;
}
} // namespace
} // namespace atom
// SharedURLLoaderFactory backed by a SystemNetworkContextManager and its
// network context. Transparently handles crashes.
@ -191,7 +195,7 @@ void SystemNetworkContextManager::SetUp(
*network_context_params = CreateDefaultNetworkContextParams();
}
*http_auth_static_params = CreateHttpAuthStaticParams();
*http_auth_dynamic_params = CreateHttpAuthDynamicParams();
*http_auth_dynamic_params = atom::CreateHttpAuthDynamicParams();
}
// static
@ -230,7 +234,7 @@ void SystemNetworkContextManager::OnNetworkServiceCreated(
return;
network_service->SetUpHttpAuth(CreateHttpAuthStaticParams());
network_service->ConfigureHttpAuthPrefs(CreateHttpAuthDynamicParams());
network_service->ConfigureHttpAuthPrefs(atom::CreateHttpAuthDynamicParams());
// The system NetworkContext must be created first, since it sets
// |primary_network_context| to true.