diff options
Diffstat (limited to 'net/http/http_auth_handler_factory.cc')
-rw-r--r-- | net/http/http_auth_handler_factory.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc index c9e0fb9..4ad7fe8 100644 --- a/net/http/http_auth_handler_factory.cc +++ b/net/http/http_auth_handler_factory.cc @@ -39,15 +39,19 @@ int HttpAuthHandlerFactory::CreatePreemptiveAuthHandlerFromString( } // static -HttpAuthHandlerRegistryFactory* HttpAuthHandlerFactory::CreateDefault() { +HttpAuthHandlerRegistryFactory* HttpAuthHandlerFactory::CreateDefault( + HostResolver* host_resolver) { + DCHECK(host_resolver); HttpAuthHandlerRegistryFactory* registry_factory = new HttpAuthHandlerRegistryFactory(); registry_factory->RegisterSchemeFactory( "basic", new HttpAuthHandlerBasic::Factory()); registry_factory->RegisterSchemeFactory( "digest", new HttpAuthHandlerDigest::Factory()); - registry_factory->RegisterSchemeFactory( - "negotiate", new HttpAuthHandlerNegotiate::Factory()); + HttpAuthHandlerNegotiate::Factory* negotiate_factory = + new HttpAuthHandlerNegotiate::Factory(); + negotiate_factory->set_host_resolver(host_resolver); + registry_factory->RegisterSchemeFactory("negotiate", negotiate_factory); registry_factory->RegisterSchemeFactory( "ntlm", new HttpAuthHandlerNTLM::Factory()); return registry_factory; @@ -89,7 +93,7 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerRegistryFactory::Create( HttpAuthHandlerNegotiate::Factory* negotiate_factory = new HttpAuthHandlerNegotiate::Factory(); negotiate_factory->set_url_security_manager(security_manager); - DCHECK(host_resolver != NULL || negotiate_disable_cname_lookup); + DCHECK(host_resolver || negotiate_disable_cname_lookup); negotiate_factory->set_host_resolver(host_resolver); negotiate_factory->set_disable_cname_lookup(negotiate_disable_cname_lookup); negotiate_factory->set_use_port(negotiate_enable_port); |