Index: net/http/http_auth_handler_factory.cc |
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc |
index decb20e49c0348ff04eb97f7cdbdac92de5e82b0..4f09c9f23c9b2f90281e8036b584db106117eb1e 100644 |
--- a/net/http/http_auth_handler_factory.cc |
+++ b/net/http/http_auth_handler_factory.cc |
@@ -53,7 +53,9 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerFactory::CreateDefault( |
registry_factory->RegisterSchemeFactory( |
"digest", new HttpAuthHandlerDigest::Factory()); |
-#if defined(USE_KERBEROS) |
+// On Android Chrome needs an account type configured to enable Kerberos, |
+// so the default factory should not include Kerberos. |
+#if defined(USE_KERBEROS) && !defined(OS_ANDROID) |
HttpAuthHandlerNegotiate::Factory* negotiate_factory = |
new HttpAuthHandlerNegotiate::Factory(); |
#if defined(OS_POSIX) |
@@ -63,7 +65,7 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerFactory::CreateDefault( |
#endif |
negotiate_factory->set_host_resolver(host_resolver); |
registry_factory->RegisterSchemeFactory("negotiate", negotiate_factory); |
-#endif // defined(USE_KERBEROS) |
+#endif // defined(USE_KERBEROS) && !defined(OS_ANDROID) |
HttpAuthHandlerNTLM::Factory* ntlm_factory = |
new HttpAuthHandlerNTLM::Factory(); |
@@ -131,6 +133,7 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerRegistryFactory::Create( |
URLSecurityManager* security_manager, |
HostResolver* host_resolver, |
const std::string& gssapi_library_name, |
+ const std::string& auth_android_negotiate_account_type, |
bool negotiate_disable_cname_lookup, |
bool negotiate_enable_port) { |
HttpAuthHandlerRegistryFactory* registry_factory = |
@@ -154,7 +157,9 @@ HttpAuthHandlerRegistryFactory* HttpAuthHandlerRegistryFactory::Create( |
if (IsSupportedScheme(supported_schemes, "negotiate")) { |
HttpAuthHandlerNegotiate::Factory* negotiate_factory = |
new HttpAuthHandlerNegotiate::Factory(); |
-#if defined(OS_POSIX) |
+#if defined(OS_ANDROID) |
+ negotiate_factory->set_library(&auth_android_negotiate_account_type); |
+#elif defined(OS_POSIX) |
negotiate_factory->set_library( |
new GSSAPISharedLibrary(gssapi_library_name)); |
#elif defined(OS_WIN) |