Index: net/http/http_auth_handler_negotiate.cc |
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc |
index 3262767ef1cc12fbad183af41d44c7daed802a10..8ced23be2e105b846d31884ef24834364e71c94c 100644 |
--- a/net/http/http_auth_handler_negotiate.cc |
+++ b/net/http/http_auth_handler_negotiate.cc |
@@ -30,11 +30,27 @@ HttpAuthHandlerNegotiate::Factory::Factory() |
HttpAuthHandlerNegotiate::Factory::~Factory() { |
} |
+void HttpAuthHandlerNegotiate::Factory::SetNegotiateDisableCnameLookup( |
+ bool disable_cname_lookup) { |
+ disable_cname_lookup_ = disable_cname_lookup; |
+} |
+ |
+void HttpAuthHandlerNegotiate::Factory::SetNegotiateEnablePort(bool use_port) { |
+ use_port_ = use_port; |
+} |
+ |
void HttpAuthHandlerNegotiate::Factory::set_host_resolver( |
HostResolver* resolver) { |
resolver_ = resolver; |
} |
+#if defined(OS_ANDROID) |
+void HttpAuthHandlerNegotiate::Factory::SetAndroidAuthNegotiateAccountType( |
+ const std::string& account_type) { |
+ set_library(make_scoped_ptr(new std::string(account_type))); |
+} |
+#endif |
+ |
int HttpAuthHandlerNegotiate::Factory::CreateAuthHandler( |
HttpAuthChallengeTokenizer* challenge, |
HttpAuth::Target target, |
@@ -61,7 +77,8 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandler( |
url_security_manager(), resolver_, |
disable_cname_lookup_, use_port_)); |
#elif defined(OS_ANDROID) |
- if (is_unsupported_ || auth_library_->empty() || reason == CREATE_PREEMPTIVE) |
+ if (is_unsupported_ || !auth_library_ || auth_library_->empty() || |
+ reason == CREATE_PREEMPTIVE) |
return ERR_UNSUPPORTED_AUTH_SCHEME; |
// TODO(cbentzel): Move towards model of parsing in the factory |
// method and only constructing when valid. |